Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mounting NAS + writing as user partly impossible
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Sun Sep 08, 2019 2:30 pm    Post subject: Mounting NAS + writing as user partly impossible Reply with quote

Recently I tried to get steamplay working and failed. I rage-quit and there´s a good reason:
there´re bigger fish to fry, our new NAS diskstation.

Diskstation has btrfs on the drives, raid0. Kernels of systems in local network have that support
as well as cifs and that´s what we use to access the diskstation.

After a few failed attempts at mounting I found a fstab line and mount command that worked but
not in the way that´s useful because I cannot write to it or see everything also because the folders and files
are root:root after mount.

fstab line:
Code:
//<IP-diskstation>/home_ <username>      /mnt/NAS                cifs            defaults,noatime,credentials=/home/<username>/.smbcredentials gid=<number>, uid=<username>  0  0


mount command:
Code:
mount -t cifs -o credentials=/home/<username>/.smbcredentials //<IP-diskstation>/home_<username> /mnt/NAS/

Got a .smbcredentials file in my home and mounting works but everything is root and I cannot use it as user.
So something is bad about my mount command .

I hope anyone here can shed some light on the issue.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6214
Location: Dallas area

PostPosted: Sun Sep 08, 2019 3:13 pm    Post subject: Reply with quote

//SERVER/share_vol /<mount point> cifs noauto,rw,guest,uid=###,gid=###,user 0 0

add vers=1.0 to options if using smb version 1.

mount <mount point> (as user)
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
EasterParade
l33t
l33t


Joined: 26 Jul 2003
Posts: 938

PostPosted: Sun Sep 08, 2019 3:50 pm    Post subject: Reply with quote

Still wrong permissions.
Up to now I had POSIX support for btrfs missing in kernel; made a new kernel with it
but couldn´t reboot as of yet (qt-webkit compiling takes forever).

Could missing posix support in kernel do that kind of issue?

Ah yes ... and this
Code:
This program is not installed setuid root -  "user" CIFS mounts not supported.
Back to top
View user's profile Send private message
petr2008
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2008
Posts: 124
Location: Prague, cz

PostPosted: Sun Sep 08, 2019 4:19 pm    Post subject: Reply with quote

When needed, I use following mount command to smb server as root:

mount -t cifs -o domain=xx,username=xxx,password=xxx //server /mountpoint

without anything in fstab and I can work on it as user.
But it is not needed very often.

On NAS I use NFS share for linux clients and smb for Windows clients.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6214
Location: Dallas area

PostPosted: Sun Sep 08, 2019 4:39 pm    Post subject: Reply with quote

transsib wrote:
Still wrong permissions.
Up to now I had POSIX support for btrfs missing in kernel; made a new kernel with it
but couldn´t reboot as of yet (qt-webkit compiling takes forever).

Could missing posix support in kernel do that kind of issue?

Ah yes ... and this
Code:
This program is not installed setuid root -  "user" CIFS mounts not supported.


It's been a while since I've had it installed, I didn't think about that :oops: , I have my mount.cifs setuid (4755 root)
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland


Last edited by Anon-E-moose on Sun Sep 08, 2019 4:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6214
Location: Dallas area

PostPosted: Sun Sep 08, 2019 4:41 pm    Post subject: Reply with quote

On the server end, how is the share set up?

[sample]
comment = sample filesystem
path = /sample
read only = No
guest ok = Yes

Edit to add: the default smb.conf that comes with samba has other examples for setting different parms, including private/public and per user shares.
_________________
UM780, 6.12 zen kernel, gcc 13, openrc, wayland
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
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