Click to See Complete Forum and Search --> : CHMOD user change


Helios
07-17-2003, 04:59 PM
I used the rename() function in PHP to rename some files. I was not logged in (meaning I did not use any FTP functions).

For good measures I CHMODed all of the files that I was renaming to 0777, just in case. After I renamed the files, I went back to CHMOD then to 0644 but now I can't. Every FTP program I use says "SITE not understood" and some sort of error, I think the error number is 550 but I am not sure. I think what happened is the Owner of the files that I renamed has changed and now I do not have permission to CHMOD them.

How can I CHMOD my files? I am not the admin of my server, perhaps the admin can do something. I tried CHMODing them to 0644 with PHP but I only get errors. I can not reupload them because they are large files and it took hours to upload them in the first place.

ksandom
07-21-2003, 08:17 AM
Do you have access to telnet? If so you can get more information be doing ls -l to see the files. I think your suspicion about the the owner of the files changing is likley. I don't know of a php command to do chmoding, and I suspect it doesn't exist since php is platform-inspecific. However, I'm sure I've seen some code before that runs system commands from within PHP. If I am right, this will allow you the ability to change the rights back.

Commands that will be useful in order of userfulness:
- chown username filename
- chgrp groupname filename
- chmod attributeVal filename

I think this method would be your best bet. Otherwise it would probably be worth getting your admin to fix it up for you, but depending on your server admin, they probably won't take kindly to doing this kind of thing often.