By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,510 Members | 1,815 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,510 IT Pros & Developers. It's quick & easy.

Problem with file permissions : PHP / FTP

P: n/a
xxx
Hello,

My php-script makes directories and puts files in it.
But via FTP'ing, I can't delete those files anymore.

Also, I need to put a whole bunch of existing files into these,
'made-by-php' directories, and that seems impossible
by means of FTP. I get an 'access denied' error every time.

Has anyone come accross the same problem and maybe
have a solution to it ? Thanks !

Steven Braeckevelt
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"xxx" <xx*@pi.be> wrote in message
news:Wi********************@phobos.telenet-ops.be...
Hello,

My php-script makes directories and puts files in it.
But via FTP'ing, I can't delete those files anymore.

Also, I need to put a whole bunch of existing files into these,
'made-by-php' directories, and that seems impossible
by means of FTP. I get an 'access denied' error every time.

Has anyone come accross the same problem and maybe
have a solution to it ? Thanks !

Steven Braeckevelt


The permissions have been set by the system. You'll need to get the person
with root password to delete them, or write another script to delete the
files you don't want.

Jul 17 '05 #2

P: n/a
"xxx" <xx*@pi.be> schrieb:
My php-script makes directories and puts files in it.
But via FTP'ing, I can't delete those files anymore.
The PHP system user is not the same user that accesses the files via
FTP. So your FTP user can't use those directories and files created by
the PHP user. The term "user" means a Unix user, not the person behind
the keyboard.
Also, I need to put a whole bunch of existing files into these,
'made-by-php' directories, and that seems impossible
by means of FTP. I get an 'access denied' error every time.


Change the access rules for the files and directories with PHP. You can
do this with chmod(). With chmod('foo/bar', 0777) the files will be
accessible for the whole wide world. For further details see the manual
at http://www.php.net/manual/en/function.chmod.php.

Regards,
Matthias
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.