Solved

group and permissions in linux for apache

Posted on 2013-12-31
5
450 Views
Last Modified: 2014-01-16
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
Comment
Question by:D_wathi
5 Comments
 
LVL 23

Expert Comment

by:savone
ID: 39749070
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
 

Author Comment

by:D_wathi
ID: 39749737
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
 
LVL 23

Expert Comment

by:savone
ID: 39749822
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
 
LVL 62

Assisted Solution

by:gheist
gheist earned 250 total points
ID: 39750413
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
 
LVL 13

Accepted Solution

by:
Sandy earned 250 total points
ID: 39761780
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provideā€¦
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question