| |||
|
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. |
| ||||
|
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 |
| |||
|
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?! |
| ||||
|
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 |
| |||
|
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. |