CHMOD Permissions and Settings


Recommended Posts

CHMOD is an older computer term that means "Change Mode" It lets the computer know or your server what other users can do to with a certain file. Many different applications and scripts use CHMOD and as a computer user you should get familiar with them.

In order for your CGI program to run, it must be executable by the server. Therefore, you must set the permissions so the server can read or execute your files, which usually means making your CGI programs world executable. The way you set your file permissions is by using the CHMOD commands.

The CHMOD's permission mask is a three-digit number. Each digit of the number defines the permission for a different user of the file. The first digit defines the permission for the owner, the second digit defines the permissions for the group and the third digit defines the permissions for everyone else (referred to by CuteFTP as public). Each digit works the same for each group of users: the owner, group, and public. What you set for one digit has no effect on the other two digits.

? Owner = the files users (you)

? Group = the files group

? Others = othPermissions Definitionsns:

? r = read access

? w = write access

? x = execNumerical Definitionsinitions:

? r = 4

? w = 2

? x = 1

You will come to recognize, if you do not already, Chmod as a word used for changing Permissions from within Telnet or your FTP client.

Some scripts will tell you to chmod 775 (for example). When using the numeric system, the code for permissions is as follows: 4 + 2 + 1 (rwx) = 7

The first number applies to Owner, the second number applies to Group, and the third number applies to Others. Therefore the first 7 of the chmod 775 tells Unix to change the Owner's permissions to rxw (because r=4 + w=2 + x=1 adds up to 7, this giving the Owner Read, Write, and Execute Permission. The second 7 applies to the group, this giving the Group Read, Write, and Execute Permission, and the last number 5, refers to Others (4 + 1= 5), giving Others only Read and Execute Permission. The permissions for chmod 775 look like this: rwx rwx -rx.

Permissions are always broken up into three groups of letters, however if there is a dash, this dash simply means that Permission wasn't given for that particular function, for example in the chmod 775, Permission to Write was not given to Others.

? --- (or 0) = no permission

? r-- (or 4) = read-only permission

? rw- (or 6) = read/write permission

? r-x (or 5) = read/execute permission

? rwx (or 7) = read/write/execute permission

Remember: the first 3 letters always apply to Owner, the second 3 apply to Group, and the third 3 apply to Others.

[400] r-------- [files, this will not let you accidentaly erase a file]

[444] r--r--r-- [files, this will allow the owner, users, and public to view only]

[600] rw------- [files, no one else can read or see files]

[644] rw-r--r-- [starting to get it?]

[664] rw-rw-r-- [files]

[666] rw-rw-rw- [files, this could very well cause chaos in satanic proportions...]

[700] rwx------ [programs / directories]

[750] rwxrx--- [programs / directories]

[755] rwxr-xr-x [programs / directories]

[777] rwxrwxrwx [using this will not be your lucky number...] \

Here are some files with access set on my web server. Notice the attributes are set in numbers.

directory2.gif

Here is the same directory through an FTP, notice this time they are showing you with letters to represent the attributes.

FTP.gif

Well, thats it for now, this is my 1st guide and I hope you found it insight;)ll and helpfull as well. ;)

Edited by markjensen
Link to comment
https://www.neowin.net/forum/topic/264720-chmod-permissions-and-settings/
Share on other sites

Do you guys actually understand it or are you just saying nice guide to be nice to me?:pp

585212179[/snapback]

*Says in druken manner* Yeah m8, two potatoes and some rubber ducks. I'M ON IT(Y))

[444] r--r--r-- [files, this will allow the owner, users, andplulic> to view only]

Seems to me it is about a day or so.  Try editing one of your older posts, and see.

585222932[/snapback]

I am from a few months back. It's only posts after the first one that can't be edited, as far as I know, but members can edit posts for an unlimited time when they are the original poster.

I am from a few months back. It's only posts after the first one that can't be edited, as far as I know, but members can edit posts for an unlimited time when they are the original poster.

585222943[/snapback]

:blink: I cant :wacko: edit my post :huh: after a certain time :pinch: even tho I'm the original :whistle: poster

Yes, guides like these are useful. :)

If you're going to administer FTP's or e.g. Linux boxes, reading up on the actually quite simple but flexible permission system is a must. And this guide helps in overcoming the "774, rwrwx... wtf??" step. :) Actually, I like this permission system more than the one in NTFS since it feels so complex (talking about the "advanced" settings on the security tab in file properties) when you can basically accomplish anything you wish from the simple system in *nix, looking historically.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Im in Ohio, and my VPN endpoint is in Boston. If that helps, it does happen both on and off the VPN. and again only in Edge.
    • It is such a shame. I used to really respect Neowin's articles.
    • So.... slower fixes and slower security updates are preferred? I mean, there is no goldilocks zone here until it can literally update without ever needing a restart, and even then I'm sure someone would complain.
    • [New Deal] Save 73% on a lifetime EbookMagic Starter Plan by Steven Parker Today's highlighted Neowin Deal comes via our Apps + Software section, where you can get a lifetime subscription and save 73% on a lifetime EbookMagic Starter Plan. EbookMagic helps turn your ideas into complete, professionally formatted ebooks without spending weeks writing, editing or designing. Simply enter your title, genre and key details, and EbookMagic creates structured content, polished layouts and a custom cover in just minutes. Instead of juggling separate writing tools, formatting software and cover generators, EbookMagic handles the entire ebook creation process in one place. Generate content, customize your book and export ready-to-use files designed for publishing, sharing or personal projects. EbookMagic Lifetime gives aspiring authors, creators and entrepreneurs the flexibility to build, publish and scale projects over time without ongoing subscription fees. Whether you're building lead magnets, creating educational resources or starting your self-publishing journey, EbookMagic simplifies the process and helps bring ideas to life faster. AI-Powered Ebook Creation AI Writing Assistant: Transform prompts & ideas into complete ebook content. 12 Professional Writing Styles: Write using multiple styles and tones. Author Style Mimicking: Adapt content to preferred writing styles. Personalized Cover Generator: Produce custom ebook covers automatically. AI Audiobook Creator: Convert your books into professional-sounding audiobooks using a variety of realistic AI voices (1 audio book included). Built to Help You Create Faster Lightning Fast Creation: Build complete ebooks in minutes. Target Audience Optimization: Tailor content to specific demographics and reader preferences. Intelligent Chapter Structure: Automatically organize chapters and generate a table of contents. 15+ Genres Supported: Create fiction, non-fiction, business, romance, self-help and more. Quality Assurance: Improve readability and engagement with built-in content optimization. Convert to Interactive Books: Transform standard content into interactive experiences. 57 Major Languages Support: Produce ebooks across supported languages. Ready for Download & Publishing Ready for Sale: Create professional books that can be published and sold on Amazon KDP and other major publishing platforms Kindle & Print-Ready Formats: Export files prepared for publishing. No Watermarks: Create cleaner deliverables for publishing. Commercial Usage Rights: Sell or publish your ebooks. Built-In Editing Tools: Make edits before export. What You'll Get 5 Ebooks per month Each generated ebook can support up to 500,000 words per book. Up to 50 cover generations 12 professional writing styles Author style mimicking Personalized Cover Generator Convert to Interactive Books Multiple languages support Kindle & Print-ready formats Commercial usage rights No watermarks Good to know Length of access: Lifetime Redemption deadline: Redeem your code within 30 days of purchase Access options: Desktop and mobile Max number of devices: Up to 3 devices can be used per license. Available for both new and existing users that are not on lifetime plan. Updates included A lifetime subscription to EbookMagic Starter Plan normally costs $149, but this deal can be yours for just $39.99, that's a saving of $109. For full terms, specifications, and license info please click the link below. Get this EbookMagic Starter Plan lifetime deal for just $39.99 (was $149) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
  • Recent Achievements

    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
    • Week One Done
      Timaximus earned a badge
      Week One Done
    • Rookie
      FBSPL went up a rank
      Rookie
    • First Post
      davidbazooked earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      491
    2. 2
      PsYcHoKiLLa
      169
    3. 3
      +Edouard
      164
    4. 4
      Steven P.
      85
    5. 5
      ATLien_0
      76
  • Tell a friend

    Love Neowin? Tell a friend!