how to make external USB HD connected to NAS shared without needing root

FTP Server, File Server, DDNS, SAMBA, AFP, NFS
Post Reply
ttreb
Getting the hang of things
Posts: 50
Joined: Fri Mar 19, 2010 3:06 am

how to make external USB HD connected to NAS shared without needing root

Post by ttreb »

Hi

I have no problem in connecting my NAS TS-410 (firmware 4.2.6) and share the NAS files with SMB but if I connected a USB HD and try to share the same way with an external HD I can only rw iles being root. Setup the drive exactly the same as my NAS (shared directory/device with rw permissions for user.

Using Ubuntu 16.04 as OS.

Is this expected behaviour? Any advise?
User avatar
dolbyman
Guru
Posts: 35275
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: how to make external USB HD connected to NAS shared without needing root

Post by dolbyman »

by default only admin has rw rights on external drives (security feature!)
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: how to make external USB HD connected to NAS shared without needing root

Post by schumaku »

ttreb wrote:I have no problem in connecting my NAS TS-410 (firmware 4.2.6) and share the NAS files with SMB but if I connected a USB HD and try to share the same way with an external HD I can only rw iles being root. Setup the drive exactly the same as my NAS (shared directory/device with rw permissions for user.
As long as the USB disk remains plugged, and the TS-410 is not rebooted, the Shared Folder Access rights for the UBdisk[n] shared folder can be set based on users and groups - just like any other shared folder.

The point is that on these legacy units that the association of an external disk to the USBdisk[n] (resp. SATAdisk[n] on NAS with eSATA ports) is not permanent. Therefore, the access rights are reset to admin r+w only.

The newer NAS models (nicked "Cat2") software does permit write labels on the external storage, and a shared folder is created (re-activated if re-plugged) according to the volume label. These shared folder access rights are retained. Multiple USB disks (with only one plugged at a time) can carry the same volume label btw., too.

Regards,
-Kurt

PS. There is no root account on QTS. The default account with the uid:0 is admin.
ttreb
Getting the hang of things
Posts: 50
Joined: Fri Mar 19, 2010 3:06 am

Re: how to make external USB HD connected to NAS shared without needing root

Post by ttreb »

schumaku wrote:As long as the USB disk remains plugged, and the TS-410 is not rebooted, the Shared Folder Access rights for the UBdisk[n] shared folder can be set based on users and groups - just like any other shared folder.

The point is that on these legacy units that the association of an external disk to the USBdisk[n] (resp. SATAdisk[n] on NAS with eSATA ports) is not permanent. Therefore, the access rights are reset to admin r+w only.
I wouldn't mind using only temporary access to the USB disk without root/admin but as far as I can tell it doesn't work at all.
The client user (my desktop) is added and the rw setting is checked on the NAS (privilege settings - shared folders) but after sudo mount -t cifs -o user=user //192.168.1.67/USBDisk1 /home/user/share I cannot write to the mounted disk but it does give me writing access if I use root on the desktop.
There is a warning: "subfolder permissions are not supported on external drives" but you can set rw on the USBDisk1 for other users than admin (not for subfolders, they change back to admin immediately)

Would be nice to have a workaround
ttreb
Getting the hang of things
Posts: 50
Joined: Fri Mar 19, 2010 3:06 am

Re: how to make external USB HD connected to NAS shared without needing root

Post by ttreb »

I can do sudo mount -t cifs -o user=admin //192.168.1.67/USBDisk1 /home/user/share
At least I can use the USBDisk then - only problem is that everything I save on the disk is owned by root.
User avatar
schumaku
Guru
Posts: 43578
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: how to make external USB HD connected to NAS shared without needing root

Post by schumaku »

Well, the CIFS mount stuff is intended for private / by-user mounts, not as a shared mount approach as used with NFS.
Post Reply

Return to “File Sharing”