The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

File named as num ZERO?!?

Discussion in 'General Discussion' started by spaZzZilla, Mar 2, 2008.

  1. spaZzZilla

    spaZzZilla Registered

    Joined:
    Jan 2, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi there,

    I have a site I run using cpanel. One part of the site uses the mediawiki software. The problem I am having is with the images. When an image is uploaded, mediawiki makes a folder to hold the image. I am having problems now because it created a folder named "0" and the file manager apparently doesn't like that. It says it is undefined. I cannot delete the file in File manager, Legacy File manager, or in the webdisk. I also cannot upload files into the images directory any more either. I assume it is due to this problem with the undefined folder.

    So,

    Can I make it so that the file manager/cpanel accepts a folder named "0"?

    or

    How do I delete these folders when they get created? Even if its a manual process of me going in a deleting them thats fine.

    I would rather make it accept this folder name.

    Thanks in advance for you help and any advice.

    -Spaz
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If the directory is not owned by you you'll need to speak to your host to change ownership of it so you can remove it. If this is your server:

    example:

    chown -R spaZzZilla:spaZzZilla /home/spaZzZilla/public_html/mediawiki
     
  3. spaZzZilla

    spaZzZilla Registered

    Joined:
    Jan 2, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for that advice, but I was wondering something. Would the ownership of the directory have something to do with the the folders that are have a "0" as the name not allowing anything to be done to them?

    Basically, when an image is uploaded, there are files created. The names are 0,1,2,3,4,5,6,7,8,9, then a,b,c,d,e,f,g, etc. Each folder has subfolders that start with the parent name so folder "a" has subfolders like a1, a2,a3, etc.

    The site was transfered from a shared host to this server, which I own. On the shared host (no cpanel), everything worked fine with file uploads being renamed, and a bunch of files were in the "0" folder. I transfered all the images over from the old site to the new one on this server i have now (with cpanel).
    Then the same thing happened that is going on now, where basically the file manager seemed to "freak out" with the "0" folder and called it undefined. So I went back through and reinstalled everything only this time without those "0" folders.

    Without the "0" folders, file manager worked fine and I could even upload files without file rename errors. But then after about 10 uploads, I got those errors again and went to check and sure enough, there was that "0" folder. It had been recreated and was back "re-messing up" ;) that directory.

    I keep getting held up at the fact that everything works perfectly without those crazy "0" folders (and I feel crazy typing "0"folders ;) ) The same problem comes up in other directories that I purposely place a folder named "0".

    I just don't know if chown - ing that directory will fix this...If it will, I do apologize for retyping the same question and appearing to doubt you infopro. I seem to know less and less the more I do things :(

    Thanks for all your help.

    -Spaz
     
  4. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    Sounds like the script you are running has created the folder as the user "nobody" - which happens on setups when PHP is not being forced to run as the username for the site, but as the generic user.

    So the only solution for this would be to chown the folder/files as Infopro suggests, in order to delete the folder/files generated by the script.

    Alternatively, once this has been rectified you could make use of suPHP to force the script to run as your username. So when a script creates a folder or file (on uploads for example) - you will still have complete access from cPanel to delete/modify these newly created items.

    In relation to the "it used to work" to "it's not working on this server which I now own" - sounds to me like suPHP was running on the shared host - but not on your current server.
     
  5. spaZzZilla

    spaZzZilla Registered

    Joined:
    Jan 2, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks again Infopro and darren.nolan for your help. The chown worked well and the errors I was getting was fixed when I chmoded them again after chown. I still am having problems with folders "0" being considered as undefined? by the file manager....however, it's an easy fix now when they show up...

    Thanks again for your help :)
     
Loading...

Share This Page