Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 4 of 4

This is a discussion on File Upload problems in the Shared & Semi-Dedicated forum
Hi All, have a question for you all here. I wrote a script which will upload a file to a place on my site. Fairly ...

  1. #1
    JPC Member
    Join Date
    Jun 2005
    Posts
    1

    File Upload problems

    Hi All,

    have a question for you all here.

    I wrote a script which will upload a file to a place on my site. Fairly easy, no major problems. The problem was when I tried to delete the file. Seems that the file has been created with the "nobody" user profile, so I cannot delete it and have to contact support to do this.

    Is there anyway to avoid this? I am hoping someone who has used jaguar has had the same problem and has a workaround???

    Thanks

  2. #2
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    Quote Originally Posted by JAdams
    Is there anyway to avoid this? I am hoping someone who has used jaguar has had the same problem and has a workaround???
    There are 2 ways to avoid this
    Way 1: after your script moves the file to its permanent location, change file permissions so it will be world writable.
    Way 2: use .cgi script to handle file uploads. Such scripts run as your user ID (rather than nobody) and the files will be created by your account ID as well.

    Hope that helps.

  3. #3
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Quote Originally Posted by JAdams
    I wrote a script which will upload a file...
    Hrm...

    Well, sometimes I can erase files that are owned by the group 'nobody' (the server), sometimes I cannot. So, this is one of those 'all depends' kind of things.

    I've had good luck using WinSCP (properly configured) to do this.

    I've had NO luck trying to change the owner, even from BASH. No priveleges...

    I've got around this occasional 'problem', from time-to-time, by making & uploading a file with the same name to the server FIRST. That way 'nobody' overwrites the file, but YOU are still the owner.

    Another thing you could do is come up with a script that makes 'nobody' erase it, as well as create it.

    And, you can always have 'Tech Support' delete the file, since they have admin rights - but, that's gonna be a PITA, for you and 'them'.

    These are just some things you could do, off the top of my head. If I think of anything else, I'll let you know...
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  4. #4
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Quote Originally Posted by gerilya
    There are 2 ways to avoid this ...
    Heh! We doubled...

    Good ideas!
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •