CHMOD on filenames with an underscore

Discussion in 'Apache' started by ericthehalfab, Nov 9, 2007.

  1. #1
    Hi all,

    Can't seem to find any information on a problem I have having with some clients images that have filenames with an _ in them such as:

    gallery_53808-DevonshireTunnel-080962-RP469.jpg

    Without getting into a discussion about how ugly these filenames are, could anyone tell me if the _ is what is stopping me from CHMODing those files, either using FTP (filezilla) or SSH (putty) and getting a 550 "bad file desciption" error.

    If I rename the directory recursively, then every filename with an _ in gets and error and is skipped and if I try to CHMOD them individually using FTP, I get the same problem. I haven't tried to chmod them individually using SSH yet.

    I am using a shared Apache server and don't really have a lot of knowledge about servers so any answers in not too techy language would be appreciated.

    Thanks in advance

    Rob
     
    ericthehalfab, Nov 9, 2007 IP
  2. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    that's a weird one for sure, have you tryed putting a \ in front of the _ , it might help
     
    powerspike, Nov 9, 2007 IP
  3. beejaysea

    beejaysea Peon

    Messages:
    141
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Or you can try enclosing the whole thing in single quotes 'file_name'. This method would be via the shell (SSH/putty). I don't know why the _ would be causing trouble. Can you do other operations on these files, like renaming them, or copying them?
     
    beejaysea, Nov 9, 2007 IP
  4. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Using PuTTY, try using a * or a ? in place of the _

    Also, tab-completion can help match the filename correctly. Just type the first few characters and then hit the tab key.

    The 550 "bad file description" error sounds like some of the file descriptors have become corrupt. If you can delete the files and restore them from a backup, that might also help.

    As powerspike said... that's a weird one. I've been using Unix and Linux for over 8 years now and I've never seen anything like that.
     
    Ladadadada, Nov 10, 2007 IP
  5. ray9

    ray9 Guest

    Messages:
    69
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Is it file description? or descriptor?
    For descriptor: Check that the HD is OK, "bad file descriptor" usually means the file system is corrupt. Run fsck (and un/re-mount or reboot) if necessary.
     
    ray9, Nov 15, 2007 IP