I am in college and have to submit my cs homework from a school Linux machine, but I like doing the homework on my laptop (Mac). So instead of copying my files over every time, then submitting them, I decided to make a script to do it for me using
ssh. When I tested my script the first time, the
scp command created the directory
hw3 on the other machine. The next time I tested it, it created the directory
hw4. Both directories had my program files in them. Since both directories only created for testing, I deleted them both using
rm -r. But here is where the problem arises.
Through later testing of my script and other debugging, I found that I now cannot create any file or folder named hw3 or hw4 on the other machine while connected to it via
ssh. I can create a folder named anything else, just not
hw4. I can't make them via
cp, or touch, making me think there is something wrong with the filesystem. However, I can make
hw4 files in the parent directory. Nobody I have talked to knows what this is and has never seen it before, and Googling the issue hasn't turned up any results.
At my school there are many different machines I can log onto and I tried several, but the problem persists on all of them, which makes sense since I am working from a network drive (SDRIVE in the path). To get the script working, I used the workaround of just making it create
hww# instead of
hw#, but I would still really like to know what is going on and how to fix it.
This is my terminal output from when I log on via
ssh and my commands.
Last login: Tue Mar 3 11:40:18 2015 from r03ane3md.device.mst.edu You are currenly one of 7 users on this host! ane3md@rc07xcs213:~$ cd SDRIVE/cs1510 ane3md@rc07xcs213:~/SDRIVE/cs1510$ ls -l total 0 drwxr-xr-x 2 ane3md mst_users 0 Mar 3 12:01 hw1 drwxr-xr-x 2 ane3md mst_users 0 Feb 21 21:37 hw2 drwxr-xr-x 2 ane3md mst_users 0 Mar 3 11:59 hww3 ane3md@rc07xcs213:~/SDRIVE/cs1510$ mkdir hw3 mkdir: cannot create directory ‘hw3’: Function not implemented ane3md@rc07xcs213:~/SDRIVE/cs1510$ touch hw3 touch: cannot touch ‘hw3’: Function not implemented ane3md@rc07xcs213:~/SDRIVE/cs1510$ mv hww3 hw3 mv: failed to access ‘hw3’: Function not implemented ane3md@rc07xcs213:~/SDRIVE/cs1510$
EDIT: As requested, running "stat -f ~/SDRIVE" outputs the following:
ane3md@rc07xcs213:~$ stat -f ~/SDRIVE File: "/usr/local/home/ane3md/SDRIVE" ID: 0 Namelen: 4096 Type: fuseblk Block size: 4096 Fundamental block size: 4096 Blocks: Total: 0 Free: 0 Available: 0 Inodes: Total: 314572031 Free: 66717154
EDIT - WORKAROUND: I did some snooping, and I found that our school uses dfshack (you can google it on github) to link Windows and unix/linux filesystems, and was made by a student here, so naturally, it has bugs. Apparently I found one of them. I also did some more testing, and found that the following process sort of works to allow me to create the directories again. I have a Mac, so I'm not sure if this would work for Windows.
- Map the network drive to Mac OS so you can access it via Finder
- Create via Finder the directory that couldn't be created before.
- Connect to the remote machine via ssh and navigate to the directory where that you couldn't create the folders or files in.
mv dirCreatedViaFinder newName
- You can now create directories and files named whatever could not be created before, but there is a drawback. If you
rm -r newName, you now cannot create
newNamefiles and folders. So I think the whole issue is caused by removing directories.