Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 23rd, 2003, 08:11 AM
saintaw's Avatar
saintaw saintaw is offline
Lurker - in your bushes
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: .be
Posts: 479 saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 12 h 39 m 8 sec
Reputation Power: 73
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.

Reply With Quote
  #2  
Old July 23rd, 2003, 10:23 AM
a.koepke's Avatar
a.koepke a.koepke is offline
Second highest poster :p
Dev Shed God 5th Plane (7000 - 7499 posts)
 
Join Date: Jul 2001
Posts: 7,323 a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level)a.koepke User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 8 h 11 m 27 sec
Reputation Power: 27
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?

Reply With Quote
  #3  
Old July 23rd, 2003, 10:46 AM
saintaw's Avatar
saintaw saintaw is offline
Lurker - in your bushes
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: .be
Posts: 479 saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 12 h 39 m 8 sec
Reputation Power: 73
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!

Reply With Quote
  #4  
Old October 3rd, 2003, 02:58 AM
saintaw's Avatar
saintaw saintaw is offline
Lurker - in your bushes
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: .be
Posts: 479 saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 12 h 39 m 8 sec
Reputation Power: 73
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.

Reply With Quote
  #5  
Old October 3rd, 2003, 08:22 AM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,225 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 44 m 44 sec
Reputation Power: 174
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


Reply With Quote
  #6  
Old October 3rd, 2003, 08:24 AM
drgroove's Avatar
drgroove drgroove is offline
pushing envelopes, not pencils
Dev Shed God 2nd Plane (6000 - 6499 posts)
 
Join Date: Feb 2002
Posts: 6,225 drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level)drgroove User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Day 4 h 44 m 44 sec
Reputation Power: 174
Duplicate threads merged.

Reply With Quote
  #7  
Old October 3rd, 2003, 10:42 AM
saintaw's Avatar
saintaw saintaw is offline
Lurker - in your bushes
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: .be
Posts: 479 saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level)saintaw User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 12 h 39 m 8 sec
Reputation Power: 73
Yes, thanks for merging.

It's running on Linux, but I have no immediate access.

Reply With Quote
  #8  
Old October 9th, 2003, 08:26 PM
hopstream's Avatar
hopstream hopstream is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 187 hopstream User rank is Private First Class (20 - 50 Reputation Level)hopstream User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 9 m 30 sec
Reputation Power: 6
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Recovering file ownership


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT