Visit Our UNIX and Linux User Community

group permissions/webserver

Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory group permissions/webserver
# 1  
Old 07-28-2006
group permissions/webserver


there is one strange situation with directory permissions that I run into every now and then, and now I face it a gain with a webserver.
Situation (example):

drwxrwsr-x 14 user www-data 4096 Jul 28 11:06 .
drwxr-xr-x 2 www-data www-data 4096 Jul 28 11:06 subdir
-rwxr-xr-x 1 www-data www-data 4096 Jul 28 11:06 subdir/file

Goal: remove or chown subdir/file without becoming root.

One could also make the top directory chgrp user, and then all files below it would be group user as well, but this does not seem to help, does it?
Thanks for a hint
# 2  
Old 07-28-2006
To chown subdir/file you have to have write permissions on this file, so I think you cannot chown subdir/file.
To remove subdir/file you need write permissions on subdir. Smilie

To avoid this in future remove SGID attribute on a '.' (current directory). If the SGID (Set Group Identification) attribute is set on a directory, files created in that directory inherit its group ownership. If the SGID is not set the file's group ownership corresponds to the user's default group.
# 3  
Old 07-28-2006
ok, but what do I gain if all files/dirs are group "user"?
# 4  
Old 07-28-2006
You can create files with your default group Smilie
But this wont help you to delete that file. You must to edit permission mask to give you needed permissions on new files (I don't think you have permissions on that too Smilie) )

Previous Thread | Next Thread
Test Your Knowledge in Computers #910
Difficulty: Easy
In C, you can declare a pointer as follows: data_type * pointer_variable_name;
True or False?

10 More Discussions You Might Find Interesting

1. Web Development

Group and user permissions on mediawiki

I am working on setup a wiki which should have users and group having read or write permission. Before that we were using simple write to all methodology. Now the challenge is this that i have created a 3 users and all of the 3 are able to write to wiki and update the page. Now what i what to... (0 Replies)
Discussion started by: sunnysthakur
0 Replies

2. UNIX for Advanced & Expert Users

Group permissions question

I have a user who has had an id change. His old id was xl00 his new id b000999. Both id's are in group bauser. The user now cannot access his old files even though he is in the same group and permissions seem to be ok. See below, first 2 files he can't see, second two are no problem. ... (2 Replies)
Discussion started by: dw82199
2 Replies

3. UNIX for Dummies Questions & Answers

Root group permissions

Hi everybody, which are the root group permissions and how can I give to a user these rights? Thanks in advance. (2 Replies)
Discussion started by: bmayao
2 Replies

4. UNIX for Advanced & Expert Users

Automate setting of group permissions

What would be a practical way of making sure files I upload to/edit in a particular directory on a server always have the correct group permissions? I'm forgetful, so I try to automate things like chgrp'ing the files when I'm done. I could write a script to be run by cron. Is that the only way,... (2 Replies)
Discussion started by: mregine
2 Replies

5. UNIX for Dummies Questions & Answers

Permissions issue with webserver and svn

Update: Please anybody can give some help ? I've an issue with files ownerships. I have a drupal website and the "files" folder needs to be owned by "www-data" in order to let the users to upload files with php. However I'm now using svn and I need all folders and files to be owned by my... (1 Reply)
Discussion started by: aneuryzma
1 Replies

6. Solaris

Group Permissions - How to tell the difference

I am a member of a few different user groups. I would like to see what the difference is.... Can anyone tell me how to look at permissions side by side ? We are using : SunOS xxxxxx 5.10 Generic_127111-09 sun4u sparc SUNW,Sun-Fire-V440 Thanks ! (10 Replies)
Discussion started by: popeye
10 Replies

7. UNIX for Dummies Questions & Answers

Group permissions

Hi, I've created a user named fwadmin, group named fwadmin and made the user belong to that group. I created the user and group using the 'User Manager' in Centos. The user belongs to /etc/fw.Does this also mean that the group fwadmin belongs to /etc/fw. That is what I want. But when I... (4 Replies)
Discussion started by: anaigini45
4 Replies

8. Shell Programming and Scripting

checking Permissions of file for OTHERS and GROUP

Hi, Is their a way to check the read and execute permission on a file on OTHERS and GROUP rwxr--r-x I am trying something like: if ( || ) then .... fi The code above only checks the permissions of the owner of the file but not for the GROUP and OTHERS. I will really... (5 Replies)
Discussion started by: rkumar28
5 Replies

9. UNIX for Dummies Questions & Answers

How to copy owner permissions to group

Hi, I need a command or a script to change the group permissions to be the same as the owner permissions for all my files and directories (recursive) any idea ? (4 Replies)
Discussion started by: ynixon
4 Replies

10. UNIX for Dummies Questions & Answers

root group permissions

Hello, Another newbie here and here is my dilemma. I created an account for me on Solaris 8 and I added myself to the root group. But when I login using that account I am unable to do superuser tasks.. (add users, admintool, etc). What am I missing? Thanks in advance.. Andre (5 Replies)
Discussion started by: jacobsa
5 Replies

Featured Tech Videos