|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
OT / File ownership.
I have a directory filled with pictures uploaded through an html form. If I try to overwrite some of these files via FTP, I get an error message tellin' me I can't (I am apparently no longer the owner of these files.).
I can circumvent this by deleting them & uploading the fresh ones, but it's getting tedious (directory is getting large). Since I can't use any php system() or exec() commands (it's on an external web server), I will have to either use the FTP commands (?) or a command line(?) Cheers,
__________________
Saintaw pending. |
|
#2
|
||||
|
||||
|
When files are uploaded by web forms they are written by the user the webserver runs as and therefore belong to that user, not yourself. You will need to use that user to remove them, ie you need to use PHP. PHP has the unlink command, can you use that?
|
|
#3
|
||||
|
||||
|
Thanks for your quick reply
![]() I was afraid of that. (Yes, I can use unlink()). However it would have been much faster/nicer to overwrite a bunch of files. Deleting / Choosing them one by one is going to be a tedious task.(Either by a script, or via the FTP client)... Files inserted by the form are given a name like "fi_1354_35123ABF13.jpg"... you can imagine pickin' 5 out of a few hundreds like that... ugly! |
|
#4
|
||||
|
||||
|
Recovering file ownership
Hiya,
I coded a script for users to upload files (pictures) via a form. No problem there. When I tried doing a backup via FTP, I could not copy those uploaded files (permission denied). What do I do to gain access ? (there are over 500 pictures) EDIT: I already posted a similar topic a while ago here Sorry about the double post, feel free to delete. Last edited by saintaw : October 3rd, 2003 at 03:02 AM. |
|
#5
|
||||
|
||||
|
What OS are you using? Linux ? UNIX? Windows? MacOSX?
__________________
Give a person code, and they'll hack for a day; Teach them how to code, and they'll hack forever. Analyze twice; hack once. The world's first existential ITIL question: If a change is released into production without a ticket to track it, was it actually released? About DrGroove: ITIL-Certified IT Process Engineer - Enterprise Application Architect - Freelance IT Journalist - Devshed Moderator - Funk Bassist Extraordinaire |
|
#6
|
||||
|
||||
|
Duplicate threads merged.
|
|
#7
|
||||
|
||||
|
Yes, thanks for merging.
It's running on Linux, but I have no immediate access. |
|
#8
|
||||
|
||||
|
Do a "Chown [your user name] *" on the files
__________________
Saving money is easy with discount codes from under tag coupons. Coupon codes for online purchases. |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Recovering file ownership |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|