You are not logged in.

#1 2014-07-23 04:51:36

mrgar
Member
Registered: 2014-05-04
Posts: 17

[Solved] Delete files from usb drive connected to wireless router

Hello,

I have a home network with Samba for file sharing.
I have a Netgear router with a Western Digital 2TB external drive attached to the router.

I installed Samba according to the arch wiki and everything works fine but I cannot delete or access some files from the shared USB drive.

I access the file as follows:

$ cd /mnt/smbnet/WORKGROUP/READYSHARE/USB_Storage/ 

Here are the permissions:

$ ls -l /mnt/smbnet
total 0
drwxrwxrwx 2 root root 0 Dec 31  1969 DEANSNETWORK
drwxrwxrwx 2 root root 0 Dec 31  1969 MYGROUP
drwxrwxrwx 2 root root 0 Dec 31  1969 WORKGROUP

$ ls -l /mnt/smbnet/WORKGROUP/
total 0
lrwxrwxrwx 1 root root 13 Dec 31  1969 READYSHARE -> ../READYSHARE

$ ls -l /mnt/smbnet/WORKGROUP/READYSHARE/
total 0
drwxrwxrwx 2 root root 0 Dec 31  1969 USB_Storage

$ ls -l /mnt/smbnet/WORKGROUP/READYSHARE/USB_Storage/
total 0
drwxr-xr-x 2 edgar users 0 Jul 22 21:04 BACKUPS
drwxr-xr-x 2 edgar users 0 Jul 15 10:43 WD

$ ls -l /mnt/smbnet/WORKGROUP/READYSHARE/USB_Storage/BACKUPS/
total 0
drwxr-xr-x 2 edgar users 0 Jul 11 22:36 Laurie_Laptop
drwxr-xr-x 2 edgar users 0 Jul 22 21:04 TRASH
drwxr-xr-x 2 edgar users 0 Jul 12 09:50 Work_Laptop

If I try to delete the BACKUPS directory, I get errors:

$ rm -r BACKUPS/
rm: cannot remove ‘BACKUPS/Laurie_Laptop’: Permission denied
rm: cannot remove ‘BACKUPS/TRASH/Documents/C++Prog/2541/BibleTriviaTest’: Permission denied
rm: cannot remove ‘BACKUPS/TRASH/Documents/C++Prog/2541/HouseTest’: Permission denied
rm: cannot remove ‘BACKUPS/TRASH/Documents/C++Prog/Bitmanip’: Directory not empty
rm: cannot remove ‘BACKUPS/TRASH/Documents/C++Prog/CurrentMusicPrograms/Musc110’: Directory not empty

etc...

Attempting to change the mode doesn't work:

$ chmod 777 BACKUPS/
[edgar@arch USB_Storage]$ ls -l
total 0
drwxr-xr-x 2 edgar users 0 Jul 22 21:04 BACKUPS
drwxr-xr-x 2 edgar users 0 Jul 15 10:43 WD

Thanks for any help you can provide.

Last edited by mrgar (2014-07-24 02:11:56)

Offline

#2 2014-07-23 07:30:18

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: [Solved] Delete files from usb drive connected to wireless router

Is the drive connected to the router which shares it; or did you install samba to serve files from your archlinux-machine? What is the filesystem of the drive? Show us the output from `mount|grep /mnt'

Offline

#3 2014-07-23 12:57:18

mrgar
Member
Registered: 2014-05-04
Posts: 17

Re: [Solved] Delete files from usb drive connected to wireless router

Here is the output:

$ mount | grep /mnt
smbnetfs on /mnt/smbnet type fuse.smbnetfs (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)

The USB drive is Western Digital My Book 2 TB drive attached as a NAS to the router that shares it.  I installed Samba on the arch machine so I can access and backup various home computers onto the NAS.

Here is some info I just found on the Western Digital Support site:

The Western Digital units mentioned above use a proprietary file system and cannot be reformatted as FAT32, NTFS, or a Mac File System.

The file system on the WD My Cloud EX2, WD My Cloud EX4, WD My Cloud, WD My Book Live, WD My Book Live Duo, WD ShareSpace, WD ShareSpace, WD TV Live Hub, My Net N900 Central, WD My Book World Edition, WD NetCenter hard drives support access from Windows, Mac and most Linux based computer systems through a SAMBA network sharing connection.

I thought I would mention that I can access the NAS and write, read and execute from the drive.

$ cd /mnt/smbnet/WORKGROUP/READYSHARE/USB_Storage/
[edgar@arch USB_Storage]$ mkdir Test
[edgar@arch USB_Storage]$ ls
BACKUPS  Test  WD
[edgar@arch USB_Storage]$ cd Test
[edgar@arch Test]$ vim testfile.txt
[edgar@arch Test]$ ls -l
total 1
-rwxr--r-- 1 edgar users 16 Jul 23 07:47 testfile.txt
[edgar@arch Test]$ cat testfile.txt 
This is a test.
[edgar@arch Test]$ rm testfile.txt 
[edgar@arch Test]$ cd ..
[edgar@arch USB_Storage]$ rm -r Test/
[edgar@arch USB_Storage]$ ls
BACKUPS  WD

However I want to copy large files with cp -ruv from my arch machine to the NAS.
This is where the trouble lies.  Thanks for your help.

Offline

#4 2014-07-24 01:52:09

mrgar
Member
Registered: 2014-05-04
Posts: 17

Re: [Solved] Delete files from usb drive connected to wireless router

Hello,

For anyone interested, I found a fix.

I was connecting the WD My Book USB Drive to the USB on my Netgear Router and accessed the file via Readyshare.
This worked but reverted somehow to read only...

So I, removed the WD My Book USB Drive from the Netgear router.  I plugged it into a Windows 7 machine, which is supported by the WD drive.
From there I removed the unwanted files and then setup the properties on the drive so any user on the network can access the drive.
I seems everything is working now from my Arch machine, a Windows 7 machine and a Windows Vista machine.

Offline

Board footer

Powered by FluxBB