FreePgs.com Forum

FreePgs Related => Support Requests => Topic started by: reverie on May 05, 2006, 05:03:43 PM

Title: Changing ownership of directories
Post by: reverie on May 05, 2006, 05:03:43 PM
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!
Title: Re: Changing ownership of directories
Post by: brainiac744 on May 05, 2006, 07:42:30 PM
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.
Title: Re: Changing ownership of directories
Post by: reverie on May 08, 2006, 03:46:56 PM
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?
Title: Re: Changing ownership of directories
Post by: Evilsprouts on May 08, 2006, 05:52:56 PM
you colud use php:
<?php chmod("/somedir/somefile"0755); ?>

or ask the admin to change it.
Title: Re: Changing ownership of directories
Post by: reverie on May 08, 2006, 07:13:54 PM
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.)
Title: Re: Changing ownership of directories
Post by: 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
Title: Re: Changing ownership of directories
Post by: Evilsprouts on May 08, 2006, 08:29:20 PM
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"
Title: Re: Changing ownership of directories
Post by: brainiac744 on May 08, 2006, 11:01:54 PM
Whooops, you're right, missed that sentence :-[
Title: Re: Changing ownership of directories
Post by: reverie on May 09, 2006, 03:14:22 PM
Thanks for your help guys. That worked like a charm!   ;D