Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 18

This is a discussion on Deleting files created by nobody in the Shared & Semi-Dedicated forum
Any idea how to delete files created by user type "nobody" besides asking Aleatia support (they have the root access)? Thanks for your help. ...

  1. #1
    Kol
    Kol is offline
    JPC Member
    Join Date
    Sep 2001
    Posts
    17

    Deleting files created by nobody

    Any idea how to delete files created by user type "nobody" besides asking Aleatia support (they have the root access)? Thanks for your help.

  2. #2
    JPC Addict
    Join Date
    Aug 2001
    Posts
    163
    Normally you can't do this, just because of the UNIX way of managing users and groups. You're not supposed to be able to delete/modify other ppl's files.

    What files do you have that belong to nobody?

    - Jonathan

  3. #3
    JPC Member
    Join Date
    Dec 2001
    Posts
    44
    Try the cgi-script 'Nobody Delete':

    Description: Nobody Delete can delete files created under the name "nobody" (i.e. files created by CGI scripts that you wouldn't otherwise be able to remove).
    http://www.hotscripts.com/Detailed/8707.html

  4. #4
    JPC Addict
    Join Date
    Aug 2001
    Posts
    163
    I stand corrected.

  5. #5
    Kol
    Kol is offline
    JPC Member
    Join Date
    Sep 2001
    Posts
    17
    What happens, is that a program I installed builds those files using "nobody" as the webserver's id.

    Therefore only root, or the program itself can delete
    them. The function that'll allow nuking of those files will be put in to the program in its next version. So for now, I 've to find a way to delete them.

    I've tried nobody.cgi before posting. However, it seems that even after executing unix commands to change to the directory where those files have been created, the script is still showing the current directory where the script resides, i.e. cgi-bin.

    Perhaps I'm missing something. Has anyone used nobody.cgi successfully?

  6. #6
    JPC Member
    Join Date
    Dec 2001
    Posts
    44
    There's another script that claims to do the same:

    Description: nobody.cgi is a simple Perl script that you can use to execute commands as user:nobody. Do you have a message board, counter or any other script on your server that generates files? Have you ever tried to manually edit one of these files? You may have noticed that you can't because you don't own the file - user:nobody owns the file and you can't edit it. By installing nobody.cgi on your server, you can execute commands with user:nobody's permissions, which means you can create, delete, view, modify and change permissions on files owned by user:nobody.
    http://www.hotscripts.com/Detailed/1669.html

    If that doesn't help, have you tried to delete the files using the file manager in the control panel? I remember (vaguely - i may not have been totally sober :weyes: ) that I had a similar problem a few days ago. Deleting the file in the file manager fixed that...but don't quote me on that.

    If all else fails...e-mail support.

  7. #7
    Kol
    Kol is offline
    JPC Member
    Join Date
    Sep 2001
    Posts
    17
    Both links led to the same script. Wonders who is the rightful programmer? My guess is the latter link.

    Anyway, I've tried file manager in cpanel. It doesn't allow as well. Looks like got to email Aletia support for support.

    Thanks to all replying.

  8. #8
    Ron
    Guest
    Create a file called, perhaps doit.cgi in your directory. In it, place the following:

    Code:
    #!/bin/sh
    echo "content-type:text/html"
    echo ""
    
    echo "hi there, deleting test.data"
    
    
    rm test.data
    Change "test.data" to the filename that is owned by "nobody" that you want to get rid of.

    chmod the directory containing the file to 777.

    Execute this script by calling it from your browser.

    Be sure to chmod the directory back to 755 or whatever value it was.

    That should do the trick without emailing support.

  9. #9
    Kol
    Kol is offline
    JPC Member
    Join Date
    Sep 2001
    Posts
    17
    Hi Ron,

    Each of my nobody files reside in a directory created by nobody as well. The higher level however is created by me. ie.

    msdirectory (me)

    --> /business (nobody)
    --> /business/index.html (nobody)

    --> /special (nobody)
    --> /special/index.html (nobody)

    e.t.c

    I tried using rmdir but not successful.

  10. #10
    JPC Addict
    Join Date
    Aug 2001
    Posts
    163
    Ah I see.

    Telnet into your shell, and type:

    chmod 777 msdirectory

    Create a new PHP script that contains the following code:

    <?
    system("rm -f msdirectory/*");
    ?>

    and view it in your browser window. That should delete all the nobody files in msdirectory.

    Then go back to your shell and type:

    rmdir msdirectory

    - Jonathan

  11. #11
    Kol
    Kol is offline
    JPC Member
    Join Date
    Sep 2001
    Posts
    17
    Hi Jonathan,

    Thanks for the suggestion. I tried it out just now, the files remain intact.

  12. #12
    JPC Addict
    Join Date
    Aug 2001
    Posts
    163
    Can you telnet into your shell, and give us the results of the following command:

    ls -l msdirectory

    - Jonathan

  13. #13
    Kol
    Kol is offline
    JPC Member
    Join Date
    Sep 2001
    Posts
    17
    I use SSH (Putty) and the result for ls -l msdirectory as follows:

    drwxr-xr-x 2 nobody nobody 4096 Dec 18 05:25 business
    drwxr-xr-x 2 nobody nobody 4096 Dec 18 05:25 consumer
    drwxr-xr-x 2 nobody nobody 4096 Dec 18 05:25 specials

    Thanks.

  14. #14
    JPC Addict
    Join Date
    Aug 2001
    Posts
    163
    Okay, getting an idea...
    Now give us the results of:

    ls -lR msdirectory

    - Jonathan

  15. #15
    Kol
    Kol is offline
    JPC Member
    Join Date
    Sep 2001
    Posts
    17
    ls -lR msdirectory gives...

    drwxr-xr-x 2 nobody nobody 4096 Dec 18 05:25 business
    drwxr-xr-x 2 nobody nobody 4096 Dec 18 05:25 consumer
    drwxr-xr-x 2 nobody nobody 4096 Dec 18 05:25 specials

    msdirectory/business:
    total 4
    -rw-r--r-- 1 nobody nobody 245 Dec 18 05:41 index.html

    msdirectory/consumer:
    total 4
    -rw-r--r-- 1 nobody nobody 245 Dec 18 05:41 index.html

    msdirectory/specials:
    total 4
    -rw-r--r-- 1 nobody nobody 245 Dec 18 05:41 index.html

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