Forum Moderators: coopster

Message Too Old, No Replies

permissions to run system() commands

         

jamie

12:52 pm on Feb 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

at the moment, i use a couple of cronjobs and wget to update some bits of the site, i would like to be able to specify a manual update by calling wget from an admin page.

the system() call works correctly, but i get permission denied. because, i presume, apache doesn't own the directory i am wget-ting to.

hmm... i can't chown the whole directory to apache.apache, because i need access to the directory for other users, (ftp). doesn anyone know a way around this?

many thanks

jamie

1:40 pm on Feb 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



out walking the dog, something just occured to me:

i could chgrp the directory to apache and chmod to 775. i haven't tested yet, but it sounds ok.

would there be any security issues by having my /htdocs folder at 775?

cheers

coopster

7:15 pm on Feb 15, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Would something along these lines work for you?
howto start proces via browser with php script using sudo [webmasterworld.com]

jamie

1:07 pm on Feb 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



yes coopster that looks ideal.

funny i saw a reference to sudo when searching ww, but it didn't register!

have now installed it and am trying it out.

many thanks