I'm trying to set up a folder that permits uploading on my wiki but I obviously don't want to give it 777 permissions for security reasons. The best way to get around this would be to make apache (or httpd or whatever is used on these servers) the owner so that it can upload files and leave the directory with 755 permissions.
I dont' have access to SSH (my plesk control panel says it's forbidden) so what can I do to change the ownership?
Thanks!
Try chmodding it to 775. I'm pretty sure that that will work, and still not expose you to the dangers of world-writeable files.
Actually I tried that, but I still get an error that the directory is not writeable by the server. The safest way would be to change the ownership of the directory to the apache server so that it can change files without the security issue...
Any ideas on how to change the ownership if I don't have access to SSH? Is there any way to do it via FTP?
you colud use php:
<?php chmod("/somedir/somefile", 0755); ?>
or ask the admin to change it.
Thanks for the response. Unfortunately, it doesn't work as expected.
Here's what I used:
<?php chmod("/images", apache); ?>
And here's what the browser thought:
Warning: chown(): open_basedir restriction in effect. File(/images) is not within the allowed path(s): (/var/www/vhosts/mydomain.com/httpdocs:/tmp)
So nothing changed at all. I may need admin help...
(BTW: I tried using the chmod command as well but it also had no effect.)
/images is not your physical path, which is what you have to put there. The physical path will be:
/fpgs/fpgshttpd/YOURUSERNAMEHERE/PATH_HERE
Quote from: brainiac744 on May 08, 2006, 08:24:21 PM
/images is not your physical path, which is what you have to put there. The physical path will be:
/fpgs/fpgshttpd/YOURUSERNAMEHERE/PATH_HERE
Looks like this dude is on plesk so the path would be "/var/www/vhosts/YOURDOMAIN.COM/httpdocs/YOUR PATH"
Whooops, you're right, missed that sentence :-[
Thanks for your help guys. That worked like a charm! ;D