LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Apache Permissions (https://www.linuxquestions.org/questions/linux-newbie-8/apache-permissions-727509/)

smoothpeddi 05-21-2009 06:17 AM

Apache Permissions
 
I have a setup of apache , the users are working on it through network , I have added the 5 users to 1 group, and i have given the full rights for the group members , when working on base machine the users can change each others dirs and files bcoz default permission assigned to them is 775 , but when working on network if a user creates a folder and file then the permission get set is 755 , this causes the group members not to change each others dirs and file , now i want the users to create a dir or files with 775 even when working on network so that the users can change each dirs and files . hw can i do so..

anomie 05-22-2009 12:16 PM

Given a group 'webusers' which contains your five users:
Code:

# mkdir /some/path/shared-folder
# chown root:webusers /some/path/shared-folder
# chmod 2770 /some/path/shared-folder

Now everything created within shared-folder will have group ownership of 'webusers'. You may additionally need to do a little umask magic to get things working just right.

For example:
Code:

$ umask
0022
$ touch foo
$ ls -l foo
-rw-r--r-- 1 e e 0 May 22 12:14 foo
$ umask 0006
$ touch bar
$ ls -l bar
-rw-rw---- 1 e e 0 May 22 12:14 bar

Permanent umask settings changes can be placed in each users' ~/.bashrc file.

soleilarw 05-22-2009 01:18 PM

This is not an Apache issue. Each directory created by a specific user will belong to that user with the standard restriction (permissions set to 755). Either the user has to chmod permissions to allow rw access for the group, or if directories are created and managed via a web interface, then the related script needs to take care of that. It is also possible to run a cron job with proper permissions to automatically adjust directory permissions for a certain directory hierarchy, but the previous suggestions are to be preferred.

Linux Archive

smoothpeddi 05-23-2009 01:33 AM

Thanks a lot .....
Actually at back end there was samba server
So i just made a change in smb.conf
the entry of 2 lines
create mask=0775
directory mask=0775
then it worked out , now my clients when saving a dir or a file they are getting the group permission which was to be done ........
thanks a lot once again


All times are GMT -5. The time now is 02:45 PM.