7
kurtr
8y

FML. Troubleshooting a bad mount. My server doesnt seem to know whether it wants "remote_images" to be a directory or a file lol.

admin@off001-truservcomm-jhb1-001:///var/...$ cd remote_images
admin@off001-truservcomm-jhb1-001:///var/...$ ls
ls: reading directory .: Not a directory
admin@off001-truservcomm-jhb1-001:///var/...$ sudo ls
ls: reading directory .: Not a directory
admin@off001-truservcomm-jhb1-001:///var/...$ cd ../
admin@off001-truservcomm-jhb1-001:///var/...$ mkdir remote_images
mkdir: cannot create directory ‘remote_images’: File exists
admin@off001-truservcomm-jhb1-001:///var/...$ rm remote_images
rm: cannot remove ‘remote_images’: No such file or directory
admin@off001-truservcomm-jhb1-001:///var/...$ sudo rm remote_images
rm: cannot remove ‘remote_images’: Is a directory

Comments
  • 2
    Oh and before someone tells me to use rmdir...

    $ sudo rmdir remote_images
    rmdir: failed to remove ‘remote_images’: Not a directory
  • 2
    Can you ls -l the directory containing it?
  • 2
    @forkbomber
    $ ls -l
    ls: reading directory .: Not a directory
    total 0
  • 1
    cd using the full path, eg:

    $ cd /var/remote_images

    ?
  • 3
    For anyone who wants to know what the hell went wrong here...

    This was a remote dir mounted from a samba share on another Windows webserver. The file permissions on Windows somehow got totally screwed and confused the hell outa linux.
  • 2
    @kurtr so the entire mount is fucked...
    If you can't unmount and mount again, I suggest you reboot your server, seems like the fastest solution.
    I hope for you this isn't critical production with loads of applications running on it.
  • 1
    @kurtr oooh, right, windows is involved :/
  • 1
    @forkbomber
    Is production. Managed to unmount it. Turns out it was the remote server. Some updates where done by someone else. Just restored the dir from a backup and its ace again.
  • 1
    @kurtr +1 for fast troubleshooting!
  • 4
    @forkbomber Thats why they pay me lol. Special thanks to everyone for the fast tips and suggestions! Thats why I love this community!
  • 0
  • 2
    @kurtr we don't pay you to spend your day on social media ! You are fired, go to Elisabeth !
  • 0
    @forkbomber haha was confused too 😂
Add Comment