files owned by user nobody

Discussion in 'Site & Server Administration' started by andre75, May 10, 2007.

  1. #1
    I have just moved some sites from a shared host (Site5) to a VPS (Servint).
    I have not made any changes to the configuration of the software running the site.
    In the past, I would upload a picture through my site (Image Gallery Module) and it would be created under my user name. Now it is created as user nobody (apache user name).

    Site5 was running php as fast-cgi and so is my current VPS setup. I have asked Servint how to change the settings so files are generated under the username.

    Apparently there is no way:

    I was wondering if there is a way after all or if its true what they are telling me and I have to execute phpsuexec.
    Then how did my files end up having the correct username under Site5?
     
    andre75, May 10, 2007 IP
  2. alexo

    alexo Well-Known Member

    Messages:
    372
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #2
    on Servint u have ssh access, go on and change chown
     
    alexo, May 10, 2007 IP
  3. andre75

    andre75 Peon

    Messages:
    1,203
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thats besides the point, because I need to do this as root.
    Thats what I have been doing anyways, its just a bit of a pain.
     
    andre75, May 10, 2007 IP
  4. Juan Pablo Olivera

    Juan Pablo Olivera Peon

    Messages:
    53
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    They are right, the correct way of doing that is using PHPSuexec. However there is some trick you could do. If you set the bit "s" to a folder, each file created inside it will have the ownership of the folder, this would be the way:

    chmod 2755 folder

    then when you do ls -lha it should look like this:

    drwxr-sr-x 2 user user 4,0K 2007-05-11 04:49 folder
     
    Juan Pablo Olivera, May 11, 2007 IP
    andre75 likes this.
  5. andre75

    andre75 Peon

    Messages:
    1,203
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That was new to me. I am going to try it out. Some green is coming your way :D
     
    andre75, May 11, 2007 IP