Go Back   Website Hosting - VPS Hosting - Domain Registration Ireland :: Blacknight > Technical Support > VPS Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 19-05-09, 04:43 PM
Junior Member
 
Join Date: May 2009
Posts: 11
Question Using 755 permissions on web upload folders

I've noticed that on the new shared hosting BK plans, standard 755 permissions allow uploading via web pages (e.g. a file upload field in a form) which is very nice.

I would like to replicate this on a linux VPS with Plesk if possible.
I still need to be able to manage the folders via FTP, so creating the folder via a script (so that it is owned by the web user) won't work for me.

If 755 permissions are not possible, I'm wondering how I can set up 775 permissions i.e. change the upload folders so that their group is the group Apache runs as. Can I do this by SSH etc? What command would I use?

Thanks for your time,
Janine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 19-05-09, 04:52 PM
blacknight's Avatar
Administrator
Site Admin
 
Join Date: Aug 2003
Location: Ireland
Posts: 629
Send a message via ICQ to blacknight
Default

Janine

If you have a vps with shell access:

chmod number filename

chmod -R number directory

eg:
chmod 666 file.txt

or

chmod -R 755 files/

HTH

Michele

PS: I may have got the order of one of those wrong for the "-R" option
__________________
Please do not send me PMs for support issues - thanks for your understanding.
Blacknight Blog | VPS Hosting| Blacknight Technical Status Blog | Hosting Wiki |Speed Test|Webmaster Chat |Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 19-05-09, 05:37 PM
Junior Member
 
Join Date: May 2009
Posts: 11
Default

Thanks for the quick reply Michele.

I can't seem to get this to work for me. Running chmod -R 755 folder/ via SSH changes the permissions alright, but I just get the same result as I would doing chmod in Filezilla.

That is, the owner and group for the folder stay the same and web uploading only works using 777 permissions which I hope to avoid.

Do I need to run some other command first to make the group something other than psacln or am I just missing something obvious?!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 19-05-09, 07:12 PM
blacknight's Avatar
Administrator
Site Admin
 
Join Date: Aug 2003
Location: Ireland
Posts: 629
Send a message via ICQ to blacknight
Default

To change ownership you need to use:
chown

Just be careful
__________________
Please do not send me PMs for support issues - thanks for your understanding.
Blacknight Blog | VPS Hosting| Blacknight Technical Status Blog | Hosting Wiki |Speed Test|Webmaster Chat |Personal Blog
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 19-05-09, 07:44 PM
Junior Member
 
Join Date: May 2009
Posts: 11
Default

Okay, so now I have the commands thanks to that, what's the most sensible permission structure:

755 and owned by the apache/web user or 775 with the group set to a group including the apache/web user?
And what is the appropriate user/group name I need to use?

The folders are owned by the a/c user at the moment with group psacln.

Under a 777 scheme, a file uploaded via the site ends up with www-data as the owner and group. So, is it safe to set either the owner or group to www-data instead?

Sorry for all the questions on this. It's just that having file uploads on a site is very common, and seeing as the BK shared servers seem to handle this just fine using standard 755 folders now (no action needed), I'd really like to avoid using 777 permissions on a VPS hosted site.

If I can just work out what the owner and group should be for the upload folders, I can get website file uploading working in a secure way.

Thanks,
Janine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
755, folders, permissions, upload, web

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:58 AM.


VPS Hosting Web Hosting Ireland Blacknight Blog Blacknight Status

Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2010, Jelsoft Enterprises Limited.

SEO by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17