Web Hosting Talk







View Full Version : Users and Ownership


WALoeIII
11-13-2002, 12:14 AM
I'm trying to setup /var/www/html to be owned by 2 users. I know I need to use a group, and I made a new one (web) putting both apache (for execution) and andrew (my ftp login) into the group. I ran chgrp command but I still can't modify files via ftp when logged in as andrew.

I know I'm missing something basic here.

prime
11-13-2002, 01:39 AM
Permissions?

chmod 660 on the files...

WALoeIII
11-13-2002, 02:30 AM
thats not it, when I chown -R andrew /var/www/html I don't get any issues.

i am a
11-13-2002, 02:33 AM
kinda building on what prime said, make sure you have it set to 664 or 775 for directories, executables, etc.. and

chgrp -R web /var/www/html

which gives the files to the group "web"

WALoeIII
11-13-2002, 02:35 AM
They're all on 644, does that basically mean that only 1 user can own them at a time?

WALoeIII
11-13-2002, 02:35 AM
Unless of course I chmod em'

prime
11-13-2002, 11:29 AM
644:

The first 6 means the owner can read & write (modify & delete the files).

The first 4 means members of the owning group can read the files.

The last 4 means that everyone else can read the file.

Basically, you have to add values up to see what can be done and what can't be done, for 3 categories of users. Owner, Group and World.

0 means no access.
1 Gives execute access.
2 Gives Write access
4 gives read access.

So 700 would give complete access to the owner. 770 would give complete access to the Owner & his group. 777 would give everyone complete access.

If the permissions are 644 now, you should change them to 664 to give eqal access to the group and the owner. 6 being 4 (read access) + 2 (write access).