PDA

View Full Version : changing file permissions



madison
17 Oct 2005, 04:07 PM
Hi Guys, help needed i'm afraid,

I have a new site that uses .cat files to create different catagories for selling items. Uisng a back-end database I can add, edit and delete items from certain catagories. Now to add a catagory, I have been told to copy another one, rename it then change the permissions of the file (CHMOD) TO 777.

wHAT DOES THIS MEAN????? I have no idea what CHMOD is and I don't know how to change permissions of files to 777.

Can someone please help me??

Many thanks,

Matthew

Rincewind
17 Oct 2005, 07:38 PM
CHMOD meand Change Mode. It basically sets the permissions of the file to say who is allowed to read, write or execute (run) the file. You can set the chmod using ssh shell commands or from your favorite FTP client. Usually you right click the file, select chomd form the popup menu or left click to select the file then go to edit - chmod in the main menu. In smart ftp you press F7.

The three numbers represent the 3 usergroups in linux (there's actually 4 but most people miss out one these days). The usergoups are Owner, Group, and World. Owner is you, Group is other people and scripts running on the same server as you and world is well everyone else.

The value of the numbers determin what level of access that usergroup gets. For example 0 means no access. Where as 7 means that usergroup can read write and execute (do anything) with that file.

Here are some common settings
000 - hides the file form everyone without deleting it.
700 - for files that only you want to be able to use. Nobody else can get in.
755 - The normal setting for directories/folders. Owner can do everything. The rest of the users can only read the folder or execute it (look inside).
644 - The normal for a file on a web server. The owner can read and write to the file but the rest can read only.
666 - Used where you have scripts writing to a file. Everyone can write or read the file but nobody executes it.
777 - Used rarely cause it's basically let everyone do anything. Required on folders where a script has to write files to the folder.