Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Permssions-Apache


yahalimu

Recommended Posts

Howdy.

I have been moving my sites over to a VPS, its a great UNIX learning process but I'm a little stumped.

Ive now done all the security patches, removed file manager etc but am now foxed by the permissions problem, ie avoiding 777.

My VPS doesnt implement phpsuexec as it implements PHP as an apache module therefore needs the 777 for the product image uploads to work.

Now Im quite content to switch the permissions by FTP every time I add products it would be good to get it working properly.

By experimentation, it does work of I CHOWN the image directorys to www-data (apache's user), but I take it this is a huge security risk for cross-site scripting exploits, or is it?

 

I could try installing phpsuexec on my VPS but the documentation suggest you need a unix knowledge higher than I have.

 

I did find this online:

 

setfacl -m u:apache:rwx directory/

 

Would this work ok?

 

Regards.

Link to comment
Share on other sites

  • 4 weeks later...

BUMP..!

 

Just for the info the above worked perfectly.

 

had to install acl first on the server (apt-get install acl) then set my webservers user (www-data NOT apache) RWX access to httpdoc directory using setfacl.

 

I can now upload images from admin and all permissions remain safe.. (Non 777)..

 

Otherwise the only option was to re-istall php on the server with phpsuexec.

NOT for the fainthearted..!

 

There was also talk that i should re-mount the file system after installing acl to activate it, but it seems to work fine as is..

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...