logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: From Web to LAMP Linux Localhost - permissions
Author
hugeness



Joined: 05 Mar 2015
Posts: 3

PostPosted: Sun 31 Jul '16 18:58    Post subject: From Web to LAMP Linux Localhost - permissions Reply with quote

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: 7355
Location: Germany, Next to Hamburg

PostPosted: Mon 01 Aug '16 15:30    Post subject: Reply with quote

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


Reply to topic   Topic: From Web to LAMP Linux Localhost - permissions View previous topic :: View next topic
Post new topic   Forum Index -> Apache