# Mounting NAS + writing as user partly impossible

## EasterParade

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:

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

```

mount command:

```
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.

----------

## Anon-E-moose

//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)

----------

## EasterParade

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 

```
This program is not installed setuid root -  "user" CIFS mounts not supported.
```

----------

## petr2008

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.

----------

## Anon-E-moose

 *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).
> ...

 

It's been a while since I've had it installed, I didn't think about that   :Embarassed:   , I have my mount.cifs setuid (4755 root)

----------

## Anon-E-moose

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.

----------

