Unable to delete a file
Hello,
I am running Ubuntu 14.04 and I have a mounted drive to a network storage device (buffalo drive). I have been able to delete files within the folder that I am working in, logged in as USER1. The file permissions of a folder that I am trying to delete is below: drwxr-xr-x 2 root root 0 Oct 10 2012 Long Short Fund When I run rsync, I am getting an error saying that it can't be copied. There is a permission denied error below: rsync: readdir("/media/winacctbuffalo/New_Acct/Saved_K_GP2000/Maher/Long Short Fund"): Permission denied (13) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]rsync: readdir("/media/winacctbuffalo/New_Acct/Saved_K_GP2000/Maher/Long Short Fund"): Permission denied (13) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0] When I try to delete it, I am getting the same error. I tried sudo chmod -R 777 foldername but, I am still unable to delete it. I also tried to sudo chown user1:user1 but that didn't work. I posted this in security thread but feel free to move if this is incorrectly place. Any ideas of what it might be or how I can delete it. The buffalo drive is viewable in a windows environment and I tried to delete it from the gui in windows but it wouldn't delete either. Not an urgent matter but it would be good to learn a new trick of how to delete the file. Thanks |
How are you running rsync? As a USER or as ROOT? That directory is 755 so only Root can write anything into it while a user can read or execute anything in that directory. If you are running rsync as a USER try running it as ROOT and it should work.
Same goes with Deleting it are you trying to delete is as a USER or ROOT? Root owns it so Root is the only one who can delete it. another thing crossed my mind how is it mounted as rw or ro? You can see this with; Code:
mount |
I run a bash script and execute it by SUDO CRONTAB -E so I believe I am running it as root. The bash script (.sh) file that I am executing is owned by root as well:
-rw-r--r-- 1 root root 345 Jun 30 14:24 myscript.sh Here is also the mount output for the drive in question: //10.140.6.100/share on /media/winacctbuffalo type cifs (rw,username=specialist,password=password,iocharset=utf8,sec=ntlm) I think I have tried to run: SUDO RMDIR /media/"Long Short Fund" but, this didn't work. Not sure if it is some weird thing going on with the file, but I can't even delete it in Windows. thanks for looking at this lazydog! |
Please try below, enclosed the whole path with quotes.
Quote:
And please watch out for case sensitivity in Linux commands. |
Quote:
Just because you mounted it as 'rw' doesn't mean you will have those right is the hosting server does not allow you to do this. |
It is a Buffalo NAS drive. I am going to try the suggestions and get back to you. I seem to have rights to all other files other than this folder. I am suspecting a corrupt folder....
|
I haven't been able to delete the file, but I am assuming it may be a corrupt folder. I also tried deleting it with fileassasin and that didn't work either because it is a folder. However, I think this is probably a corrupt folder. Let me know if anyone else thinks of anything. I will close thread for now. Cheers!
|
For a local filesystem, the last resort is to run debugfs on the partition holding the filesystem, use the clri command to clear the bad inode, then run fsck to clean up the resulting filesystem inconsistencies. Whether you can log into your NAS device and have the necessary access to do that is another question.
|
All times are GMT -5. The time now is 10:32 PM. |