NFS Permission problem

Post new topic   Reply to topic    DD-WRT Forum Index -> Qualcomm Atheros based Hardware
Author Message
ctt95
DD-WRT Novice


Joined: 25 Oct 2020
Posts: 2

PostPosted: Tue Mar 18, 2025 20:22    Post subject: NFS Permission problem Reply with quote
Netgear R7800 running build r60276. I attached a USB hard drive box which I want to share. With previous build r53562 I have been able to use Samba to access the drive from my Ubuntu linux box flawlessly.
With the new build I cannot access the Samba share anymore. More specifically, I have 3 partitions on the drive:
Code:
/opt
/jffs
/tmp/mnt/sda4

the first two I can mount and access as before. The third, which is the one I need because it has space for the data, fails to mount. Basically, the command
Code:
mount -t cifs

doesn't work. If somebody can explan why I would be happy to hear. Anyway...

Since I am not a Windows user I am very happy to switch to NFS, but I can get read access only if I mount the volume as root, while I would prefer to use the share as a regular user.

In Services->NAS I enabled NFS server and added the share /mnt/sda4 with Read/Write access and accessible from 192.168.3.0/24.

I mount the share from my linux box using
Code:
192.168.3.1:/mnt/sda4 /home/john/nas nfs rw,user,noauto 0 0

but the permissions I get are
Code:
ls -l
drwxr-xr-x 19 root  root

so as said, only root can write on the volume.
It has been suggested to me to change the owner of the folder /mnt/sda4 in the dd-wrt system to the uid and gid of the regular user in the linux box I use to access the share, but I do not feel comfortable with that solution.
Any suggestion on how to configure the share? Am I forced to use the share as root?

Many thanks
Sponsor
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 755
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Tue Mar 18, 2025 21:07    Post subject: Reply with quote
You could consider using sshfs.

(I appear to not be able to post ls -la command output or whatever it is that prevents me from posting.)


It looks to me that owner and permission data as seen from my workstation reflect the properties of the files and folders on the thumbdrive itself.

Mounted on the workstation using a line like this:

sshfs -p <port#> root@<router.domain>:/jffs /mnt/jffs

I cannot remember if it required some extra installation on either workstation or router. You have an opt partition, so I assume you would have entware, like me, and can get required packages from there.

I've used samba and probably tried nfs, too, but wasn't happy with either and found a suggestion on this forum to use sshfs, which was new to me (except I remember using it for backintime to a remote drive).
ctt95
DD-WRT Novice


Joined: 25 Oct 2020
Posts: 2

PostPosted: Thu Mar 20, 2025 19:34    Post subject: Reply with quote
Seems like sshfs was the way to go in my case. I had to install Entware and openssh-sftp-server and somehow I managed to have it working, I am not an expert.

Now I can mount the share from my Linux box with

Code:
sshfs root@192.168.3.1:/tmp/mnt/sda4 /home/franco/nas


and get full read/write access to the folder.
Thanks a lot for your help.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Qualcomm Atheros based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum