LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-12-2013, 05:31 AM   #1
agriz
Member
 
Registered: Nov 2011
Posts: 197

Rep: Reputation: Disabled
File Permission


I changed the file permission. Now I am not able to access the website.

nginx + php-fpm

previously,

Code:
chown -R user1:user1 /var/www/site.com
I read in internet, and then i changed the file permission.

Code:
groupadd web-content 
usermod -G web-content user1
usermod -G web-content apache
Code:
chown -R user1:web-content /var/www/site.com
find /var/www/site.com -type f -exec chmod 640 {} \;
find /var/www/site.com -type d -exec chmod 750 {} \;
After this, site is displaying 404 error.

From the above setting i added nginx to the web-content group. Still not working.

Code:
usermod -G web-content nginx
Additionally, with this setting, I can't allow users to upload photos to uploads/ directory. But i want to allow users to upload photos

Last edited by agriz; 10-12-2013 at 07:10 AM.
 
Old 10-12-2013, 12:44 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
set permissions to 755 and see if that makes a difference.

https://www.digitalocean.com/communi...ts-on-centos-6
 
Old 10-12-2013, 12:46 PM   #3
agriz
Member
 
Registered: Nov 2011
Posts: 197

Original Poster
Rep: Reputation: Disabled
644 and 755 works. But why should i give 644 and 755? nginx and php-fpm under apache username handles the request for the users.
nginx, apache(php-fpm) and me are in the group web-content.

so 640 and 750 is enough to those group to handle the files and folders?
 
Old 10-12-2013, 09:52 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
http://www.linux.com/learn/tutorials...le-permissions
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
File & Folder Permission and Ownership permission error in Cloud storage. rhcekumaran Linux - Newbie 3 06-14-2013 04:41 AM
[SOLVED] Apache 403 file permission error when accesing a symlink file (CentOS 6.3) mkvakic Linux - Newbie 7 02-13-2013 03:25 AM
Reading ext3 file system on Mac and overriding file permission moravveji Other *NIX 6 09-12-2011 02:25 AM
Any log file for checking file permission change history in RHEL 5.1? bilalcochin Linux - Newbie 3 04-02-2010 09:57 AM
change file permission of a mouse device file permanently alexandre_fs Linux - General 5 01-09-2007 06:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration