Question: What ownership does Apache need so that it does not require execute permissions for the world on public_html (751)?  Background: When I changed the php.ini settings through cPanel, there was an error "Error: The EUID, 1005, does not own /home/my_user_name/public_html/.htaccess." I understood this because it was the .htaccess file was owned by root:root,   So, as a green SHELL user I changed the ownership of every file using chown -R my_user_name:my_user_name .[^.]*. Sweet, I could now save my php.ini through MultiPHP INI in cPanel.  That's when this pretty error appeared when trying to visit any page on my Drupal 8 site:     Forbidden You don't have permission to access / on this server. Server   unable to read htaccess file, denying access to be safe      Additionally, a 403 Forbidden error was encountered while trying to   use an ErrorDocument to handle the request.   Even after deleting, reuploading, and changing the ownership back to root:root, it didn't work.  The only thing that worked was changing public_html to 751 (instead of 750). Why does Apache need the execute permissions for the world? And which owner/group do I need to change it to fix it?  754 also didn’t work
13585
This is a  about File Permissions on a Linux web server.   I have a Linux web server running Apache2 that hosts several websites. Each website has its own folder in /var/www/.  /var/www/contoso.com/ /var/www/contoso.net/ /var/www/fabrikam.com/   The base directory /var/www/ is owned by root:root. Apache is running as www-data:www-data. The Fabrikam website is maintained by two developers, Alice and Bob. Both Contoso websites are maintained by one developer, Eve. All websites allow users to upload images. If a website is compromised, the impact should be as limited as possible.  I want to know the best way to set up permissions so that Apache can serve the content, the website is secure from attacks, and the developers can still make changes. One of the websites is structured like this:  /var/www/fabrikam.com     /cache     /modules     /styles     /uploads     /index.php   How should the permissions be set on these directories and files? I read somewhere that you should never use 777 permissions on a website, but I don't understand what problems that could cause. During busy periods, the website automatically caches some pages and stores the results in the cache folder. All of the content submitted by website visitors is saved to the uploads folder.
7399
I've a Centos 7 with Apache, I want to compile php 7.0 and 5.6 and configure that as PHP-FPM. How can I configure Apache to allow users to change php version using .htaccess?  Example .htaccess entry:     AddHandler application/x-httpd-php7 .php
46325
After upgrading from Ubuntu 13.04 server, the www pages won't display themselves.     Error 403 Forbidden You don't have permission to access / on this server.   I've changed access control saves from apache2.2 to apache2.4, but that didn't work. What else could I do?
89999
Centos recently updated to 7.3 and there's been problems with sshd sftp group permissions. I have one user that is chrooted to it's home directory, and that user is in group sftponly. Then i have the /var/www directory, which has 775 permissions and owner is apache and owner group is sftponly. I have a bind link pointing from /home/user/files/web --> /var/www, so the user can access /var/www even though being chrooted to it's home directory. I can view files in /var/www with that user, but impossible to edit or add anything. This worked fine before the big Centos 7.3 update, and now it's stopped working. Any ideas?
49449
My user account on Windows 7 is part of the Administrators group which has a full control permissions on C:\inetpub\wwwroot:    However, when I try to create a folder in it, I get the "access denied" error. This is fixed by adding my specific user account to the list but that shouldn't be necessary should it?
11833
Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www  I gave myself administrative privileges in Ubuntu but it still doesn't allow copies.
9456
I accidentally changed /var owner/group to my username and then changed it back to root, but not all the /var folders' owners are root, so is there anyway to change back owner/group of files/folders to default state?  Or at least those files/folders that are created by packages?
79467
This should be the easiest thing to do, but for some reason I just can't get it done.  I'm trying to get a friendly static error page to replace nasty 500 scenarios. For now I'm just trying to replicate a 500 situation on my local machine (Drupal 7 running on MAMP) by throwing in some crap characters on the top of my template.php in my theme, which does trigger a 500 situation, but for some reason the ErrorDocument directive in my .htaccess or Apache config file has no effect.  What I'm doing is quite simply this:  ErrorDocument 500 /500.html   And I have the simplest ever static html-page in the root of my site with the name of 500.html.  Still, when I intentionally break template.php, I get the dreaded White Screen Of Death instead of my nice friendly error page.  What am I doing wrong here? I've done this a billion times in non-Drupal setups but just can't get my head around this one.
46842
Server: Ubuntu 12.04 w/ LAMP I can access the default index.html, but I created a symbolic link to a folder in my Dropbox.  Whenever I try to access 192.168.2.6/Joomla (Joomla is the symbolic link), I get a 403 error.  Editing my httpd.conf according to  didn't work.  I can post conf files, etc, just ask.  I've tried using chmod to allow all permissions on the files in question, but that didn't help.  Also, I deleted the default index.html to force Apache to show the www directory.  It shows, but is empty (Symbolic link doesn't show up)  Output from ls -lSrah (in Joomla):   total 7.6M -rwxrwxr-x  1 somekittens somekittens  865 Mar 31 18:03 robots.txt -rwxrwxr-x  1 somekittens somekittens 1.3K Mar 31 18:03 index.php -rwxrwxr-x  1 somekittens somekittens 1.7K Mar 31 18:03 web.config.txt -rwxrwxr-x  1 somekittens somekittens 1.8K Mar 31 18:07 joomla.xml -rwxrwxr-x  1 somekittens somekittens 3.1K Mar 31 18:03 htaccess.txt drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 tmp drwxrwxr-x  6 somekittens somekittens 4.0K Mar 31 18:03 templates drwxrwxr-x 13 somekittens somekittens 4.0K Mar 31 18:03 plugins drwxrwxr-x 26 somekittens somekittens 4.0K Mar 31 18:03 modules drwxrwxr-x 15 somekittens somekittens 4.0K Mar 31 18:03 media drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 logs drwxrwxr-x  7 somekittens somekittens 4.0K Mar 31 18:03 libraries drwxrwxr-x  4 somekittens somekittens 4.0K Mar 31 18:03 language drwxrwxr-x 10 somekittens somekittens 4.0K Mar 31 18:03 installation drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 includes drwxrwxr-x  4 somekittens somekittens 4.0K Mar 31 18:03 images drwxrwxr-x 13 somekittens somekittens 4.0K Mar 31 18:03 components drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 cli drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 cache drwxrwxr-x 10 somekittens somekittens 4.0K Mar 31 18:03 administrator drwxrwxr-x  5 somekittens somekittens 4.0K May 25 08:51 .. drwxrwxr-x 17 somekittens somekittens 4.0K May 25 08:53 . -rwxrwxr-x  1 somekittens somekittens 4.2K Mar 31 18:03 README.txt -rwxrwxr-x  1 somekittens somekittens  18K Mar 31 18:03 LICENSE.txt -rwxrwxr-x  1 somekittens somekittens 7.5M Mar 31 18:18 Joomla_2.5.4-Stable-Full_Package.zip   Output from ls -lSrah (in /var/www/):    somekittens@KittensTest:/var/www$ ls -lSrah total 7.5M lrwxrwxrwx  1 root root   41 May 25 09:39 Joomla -&gt; /home/somekittens/Dropbox/Project/Joomla/ drwxr-xr-x 13 root root 4.0K May 24 20:50 .. drwxr-xr-x  2 root root 4.0K May 25 10:08 .   /etc/apache2/httpd.conf  &lt;virtualHost indextj:80&gt; ServerAdmin webmaster@indextj  DocumentRoot /home/somekittens/Dropbox/Project/Joomla &lt;Directory /&gt;         Options +FollowSymLinks -SymLinksIfOwnerMatch         AllowOverride All &lt;/Directory&gt;
113132
I have noticed that I am unable to preserve ownership if I rsync -o files. However, I am when I move them.  This is all without admin privileges. What is the rationale of this? Several threads e.g. () seem to echo the need for admin privileges
89671
I have a shell script called boot.sh on an Ngnix server  I am trying to call it via PHP, but I don't think I have permissions.   How can I give www-data permission to run boot.sh - and only boot.sh  When trying sudo chown or sudo chgrp I am getting Operation Not Permitted
19198
I was wondering if it was possible to reset all the folders' rights. I was having trouble when trying to install LAMP on my Ubuntu 11.04 installation, and I modified many permissions like /var /etc and I want to cancel everything I did and have permissions set to how they would be after a new install.
82932
I have set up a LAMP server and I have access via SSH and to the "it works" page from a web browser from inside my network (via ip address) and from outside using dyndns.  We have some Wordpress projects that sit in subdirectories in /var/www/wordpress1 /var/www/wordpress2, etc.  I cannot access these sub directories from a browser in order to set up WP--or (I assume) to see the content on a browser. I get a 403 Forbidden error on my browser.  I assume that this is a permissions problem.  Can you please tell me the proper settings for the permissions to:   Allow the developers and me to read/write. to allow WP set up and do its thing Allow visitors to access the site(s) via the web.   I should also mention that the subfolder are actually simlinks to folder on another internal hdd--I don't think this will make a difference, but I thought I should disclose.  total 12 drwxr-xr-x  2 root root 4096 2012-07-12 10:55 . drwxr-xr-x 13 root root 4096 2012-07-11 20:02 .. lrwxrwxrwx  1 root root   43 2012-07-11 20:45 admin_media -&gt;     /root/django_src/django/contrib/admin/media -rw-r--r--  1 root root  177 2012-07-11 17:50 index.html lrwxrwxrwx  1 root root   14 2012-07-11 20:42 media -&gt; /hdd/web/media lrwxrwxrwx  1 root root   18 2012-07-12 10:55 wordpress -&gt; /hdd/web/wordpress   Here is the result of using chown -R www-data:www-data /var/www  total 12 drwxr-xr-x  2 www-data www-data 4096 2012-07-12 10:55 . drwxr-xr-x 13 root     root     4096 2012-07-11 20:02 .. lrwxrwxrwx  1 www-data www-data   43 2012-07-11 20:45 admin_media -&gt; /root/django_src/django/contrib/admin/media -rw-r--r--  1 www-data www-data  177 2012-07-11 17:50 index.html lrwxrwxrwx  1 www-data www-data   14 2012-07-11 20:42 media -&gt; /hdd/web/media lrwxrwxrwx  1 www-data www-data   18 2012-07-12 10:55 wordpress -&gt; /hdd/web/wordpress   I am still unable to access via browser.
29983
I'm having a problem setting up a vhost on Apache 2.4, using CentOS 6.3.  This question seems to have been answered several times on this forum, but none of the solutions work for me.  Basically, I set up a vhost with a particular document root. When I attempt to access the site, I get a permissions error. But I have no problem if I use a different root.  More specifically, if I set the root to be /volume1/web/xxx, I get a 503 because of a permission problem on index.html.  But if I set it to be /volume1/web, the index.html comes up without a problem.  The details:   I set the persmissions on volume1, web, and xxx to 755. I set the permissions on the index.html files to 777. I copy the index.html file to both /volume1/web and /volume1/web/xxx, so that they have identical index files with identical permissions.   In httpd.conf, I set the VirtualHost options so that I can easily switch the document root by changing 2 comment marks  I have the following lines in the conf file:  NameVirtualHost *:80  &lt;VirtualHost *:80&gt;     ServerName localhost     #DocumentRoot /volume1/web     DocumentRoot /volume1/web/xxx      #&lt;Directory /volume1/web&gt;     &lt;Directory /volume1/web/xxx&gt;       Options Indexes FollowSymLinks Includes ExecCGI       AllowOverride All       Order Allow,Deny       Allow from all     &lt;/Directory&gt;      ErrorLog logs/localhost-error_log     CustomLog logs/localhost-access_log common &lt;/VirtualHost&gt;   These lines contain all the suggestions that worked for other people with the same problem.  What I get when I enter localhost in my browser depends on the document root.   If the root is /volume1/web, the index.html page comes up. if the root is /volume1/web/xxx, then I get a 503 error, and the apache error log has this line:  [Thu Jul 19 17:17:52 2012] [error] [client ::1] (13)Permission denied: access to /index.html denied   I also tried adding an index.php file to the directory. I then got permission denied messages for both the php file and the html file.  I also tried setting the user : group to apache : apache on the directories and files. That didn't help.  I've done everything I can think of to fix the permissions, to no avail.  Does anyone have an idea about what's happening here?  Thanks.
20739
I'm logged into a server as user "ubuntu" and I've got files that look like this:  -rw-rw-r-- 1 www-data www-data 33150 2012-06-04 22:17 file-a.png -rw-rw-r-- 1 www-data www-data 36371 2012-06-04 22:15 file-b.png -rw-rw-r-- 1 www-data www-data 41439 2012-06-04 22:16 file-c.png   The ubuntu user is a member of the group www-data:  groups ubuntu   produces  ubuntu : ubuntu www-data   So shouldn't I be able to change other permissions since I have access to the file? I'm not an expert on the user/group stuff. So this is just perplexing me.  I'm trying to run:  chmod o-r *  I realize I can do it with sudo, easily, but I'm trying to understand why I can't modify the files without sudo.
46447
My issue is that I've seriously busted all of the owners and permissions on my user folder and subfolders and it's causing lots of issues using lots of applications.  The initial cause was that I had renamed a user by following the Apple support instructions at   After the new user was set up, Mozy backup wouldn't backup any more and lots of my applications couldn't update themselves automatically. The application usually started working again if I deleted the offending program and reinstalled it. I thought it was because the permissions were wrong and I found some places where GetInfo indicated that permissions were referencing the old user. Sometimes the dialog just said "Fetching" for the username and never updated to anything else.   I ran Onyx "fix permissions" and Disk Utility "Repair Permissions" with no results. With "Repair Permissions", it keeps throwing some info warnings about unexpected ACLs, but the info I could find online didn't think those would be causing issues like this.  I tried to recursively run some command line scripts on the user folders (both logged in as root and using sudo). chmod got lots of errors about the owner of the files being wrong. chown after that gave me other errors (I can't remember exactly what they were). In a fit of panic, I right-clicked the entire user folder and chose to apply it's permissions to all children.   From what I can tell, when I did that, I set everything to Read&amp;Write for that user and Read-Only for "everyone" and "staff". Now, I'm worse off than before. Firefox crashed and it can't even update it's own settings so it brings up the "Do you want to restore these tabs" every single time it launches, even after repeatedly saying "Start New Session".  Basically, everything in my user folder is broken with regards to owner and permissions and I need to know what they are supposed to be. Who is the owner of the files in each directory supposed to be (Downloads, Applications, etc.) and what should the permissions be? Given those permissions and owners, what is the best way to go about setting those all right?  I saw a question similar to this at  but it only addresses permissions, not owners, which has been an issue already.  I'm not sure if reinstalling the OS over the copy I have right now would fix anything and I'm close to calling Apple Support if I can't figure anything out in the next few days. Thanks for any help.
43338
I am unable to call PHP files inside the Drupal directory. My task is maintaining staff's old pages on the new platform. With pages written on clear HTML, there is no problem: I place files in a folder I created (domain.org/sites/default/files/share/staff_folder).  In sites/default/files/.htaccess I added DirectoryIndex share and now the link to the domain.org/sites/default/files/share/staff_folder/index.html can be used. When I import pages written in PHP, e.g. calling domain.org/sites/default/files/share/staff2_folder/index.php, I get a 403 error:     Forbidden      You don't have permission to access /sites/default/files/share/staff2_folder/index.php on this server.   While /sites/default/files/share/staff2_folder/index.html still works.