• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 473
  • Last Modified:

group and permissions in linux for apache

Dear Experts:

We are having an CRM application still the development is in progress we would like to restrict the crm  developer with ftp access to the /var/www/html/sugar_1 hence created user account as sugar_1 and home directory is in /var/www/html/sugar_1 and shared the ftp login details also used vsftpd and jailed to home directory, now the application requires the user to be apache and also read , write and execute permission whenever the developer uploads developed code then it is being uploaded as ftp login user name

Please suggest how to handle this, how to add apache user become user/owner for the files uploaded by the ftp user.

Please suggest thanks in advance
0
D_wathi
Asked:
D_wathi
2 Solutions
 
savoneCommented:
The following will make your developer the owner of the files, and give the user group apache (which apache server usually belongs) read, write and execute permissions.  This will also allow read and execute permissions for everyone else (usually needed for a website).


chown suger_1:apache /var/www/html/sugar_1
chmod -R 775 /var/www/html/sugar_1
0
 
D_wathiAuthor Commented:
Thank you very much for the reply, we also have done sugarcrm integration with asterisk if ftp user and apache is only set with 775 than asterisk in crm is not working but if we set 777 i mean rwx for others it is working,  

I think asterisk should also be the owner for this sugar_1 directory, please suggest how to make asterisk also owner for the directoy sugar_1 in addition to the sugar_1 and apache,

Thanks in advance.
0
 
savoneCommented:
You can't make two people the owner of any file or directory.  You can however add asterisk to the apache group with the permissions I gave you earlier.

Better yet, make an entirely new group and add apache and asterisk to it and give that group permissions to the sugar_1 directory.
0
 
gheistCommented:
You need to add apache to default group of that user (say put all those uploading users in group "uploaders" and make their chroot directories g+s "uploaders and all the files will be read by apache)

Can you elaborate on what apache will execute?
0
 
SandyCommented:
Just to add here... Why don't you use "acl" parameter of filesystem which will allows you to add multiple users as user/group owner of single directory each with own set of permissions.

#setfacl -m u:user:rwx /directory_to_be_used

#getfacl /directory_to_be_used

To apply it first you need to enable to FS with acl option.

TY/SA
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now