Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: From Web to LAMP Linux Localhost - permissions |
|
Author |
|
hugeness
Joined: 05 Mar 2015 Posts: 3
|
Posted: Sun 31 Jul '16 18:58 Post subject: From Web to LAMP Linux Localhost - permissions |
|
|
Hello
Noob with Apache(2) have moved a site for testing off the web, to the Apache www folder for testing.
Came across issues as soon as I did this with permissions. Had to mv as root to get the folder in there, then trying to open the site from localhost, getting
Forbidden
You don't have permission to access /shop/index.php on this server.
The folder is set to owner:me (my user)
group (me again)
access (none)
others access (none)
I see the obvious seems to be access 'none' but it was working online? so confused by this. Concerned that as this is a zencart ecommerce site, messing with permissions could mess it up when I put it back online?
I have one file in there, the test php file, which works fine, it has permissions owner:root
group:root
access:read only
others access read only
and that page works fine.
The site is a zencart site, so worried about messing with permissions as I am going to need to put this back up on the web for production.
> lastly, why is it that windows seems to cope with shifting files around like this without these permissions issues?
Thanks for any input! |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 01 Aug '16 15:30 Post subject: |
|
|
it depends on which user you run your apache on linux.
You can set that in the httpd.conf file ( sometimes apache2.conf ( different from distro to distro)).
Why are permissions handled different on Linux than on Windows? There is different approuch how to handle permissions. Windows knows a multiple owner ship of a file while linux knows only one owner.
if you run on linux and the apache user and group is www-data or daemon directory permissions should be 0755 and file permissions 0644. |
|
Back to top |
|
|
|
|
|
|