How would you set up mounting samba share so you would have identical options like gvfs gives - so the users could read / write files and directories without any hassle?
Currently when I use mounting via nautilus (thus gvfs) when I right click on a file / directory and go to permissions tab I get a message they can’t be established - but everything works and users have great experience.
WHen I’m adding mount via fstab users can see the share, can write the files - but can’t delete them. When I go to permissions tab in the file manager I see tab user #1002 is the owner (with rw permissions), group is samba_share (read-only), and the rest has read only permissions as well. Here’s my entry in fstab:
it’s even weirder - files/directories saved in main samba share folder can’t be deleted, but stuff created in subdirectories can.
So for example - I’ve mounted samba share to /mnt/netshare . User can create test folder there - but can’t delete it. If he/she opens this newly created folder and creates something there it can be deleted. At first glance permissions look identical.
So yeah, a way to mount permanently to a specified folder so it would behave as something added via gvfs without this permissions / acl etc mess would be awesome. I really don’t get it why it has to be so complicated.
Dynamically mounting using nautilus (gvfs) is not an option as not all apps see those and most users have no clue where to navigate to actually find it.
Hi
So is the samba setup a computer or an off the shelf NAS?
If off the shelf NAS, then suggest working with smbclient command line to check settings/commands to build up the fstab requirements. if you add debug output you will note that it does read the ‘global’ section of the hosts /etc/samba/smb.conf file, so it may need some tweaking here as well.
For example;
smbclient -d3 //<server>/<user>
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[global]"
smb: \> mkdir test
test D 0 Mon Oct 22 08:56:18 2018
smb: \> rd test
smb: \> ls test
dos_clean_name est]
unix_clean_name est]
NT_STATUS_OBJECT_NAME_NOT_FOUND listing est
On Mon 22 Oct 2018 02:06:03 PM CDT, malcolmlewis wrote:
Hi
So is the samba setup a computer or an off the shelf NAS?
If off the shelf NAS, then suggest working with smbclient command line
to check settings/commands to build up the fstab requirements. if you
add debug output you will note that it does read the ‘global’ section of
the hosts /etc/samba/smb.conf file, so it may need some tweaking here as
well.
For example;
Code:
smbclient -d3 //<server>/<user>
lp_load_ex: refreshing parameters
Initialising global parameters
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit
(16384) Processing section “[global]”
smb: > mkdir test
test D 0 Mon Oct 22 08:56:18
2018 smb: > rd test
smb: > ls test
dos_clean_name est]
unix_clean_name est]
NT_STATUS_OBJECT_NAME_NOT_FOUND listing est
Hi
Also if you mount via Nautilus/gvfs, then the mount command will also
show the option (-o) to add to your fstab, eg;
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.22-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
Sorry for completely noobish question but - what is the exact command I should type?
mount -o
requires options.
Also I’m not sure how I could pass those parameters like that - gvfs stores username / password somewhere so I assume I’d need to add username / password to cifs entry in fstab (or store those in external file)?
The “file server” is an old PC running Opensuse Leap - I think 42.2 version (will need to check). When I’ll be back at work I’ll copy smb.conf from it and will post its contents.
Humbly admit configuring samba on Linux in something that trips me every time…
On Mon 22 Oct 2018 04:26:03 PM CDT, Pshemas wrote:
malcolmlewis;2884062 Wrote:
> Hi
> Also if you mount via Nautilus/gvfs, then the mount command will also
> show the option (-o) to add to your fstab, eg;
>
Sorry for completely noobish question but - what is the exact command I
should type?
mount -o
requires options.
Also I’m not sure how I could pass those parameters like that - gvfs
stores username / password somewhere so I assume I’d need to add
username / password to cifs entry in fstab (or store those in external
file)?
The “file server” is an old PC running Opensuse Leap - I think 42.2
version (will need to check). When I’ll be back at work I’ll copy
smb.conf from it and will post its contents.
Humbly admit configuring samba on Linux in something that trips me every
time…
Hi
Might want to upgrade your samba system first…?
To see what/how it’s mounting by default, just run the command mount to
get the output. Then have a look at the man page for fstab, to see
how/where to add your mount options.
So you may need to tweak the smb.conf file on the server for your
requirements?
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.22-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
I’d prefer to avoid touching the “server”. It works - Windows clients don’t have any issues connecting to it and also when I connect via Nautilus (gvfs) everything works correctly (but as much as I’d like it to be, it is not an option - not all apps can use gvfs and don’t show such volumes).
So it points me that the settings I’m using fstab are at fault. WHy oh why it needs to be so complex … How I wish there was a way to use tech similar to what gvfs instead those cifs parameters and I wouldn’t have to deal with all those options (and there’s ton of them - and by reading the manuals I don’t get what some of them actually do or some seem to be doing exactly the same thing - super confusing) and permissions. I just want to mount the share to a specific folder in such a way noone will have to deal with permissions and everyone on that PC will be able to read / write (no need to worry about permissions at all - that’s why what gvfs does in this regard would be perfect for my use case).
For me the most confusing part with the current setting is the inconsistent behavior - can’t delete/modify in the main folder (but can add new files / folders), but can in subfolders. Weird.
Anyways I’ll look into samba.conf and will post its contents. How it is set up on my (client) end (and contents of my fstab) are already here - hopefully we’ll be able to figure it out.
On Mon 22 Oct 2018 05:16:03 PM CDT, Pshemas wrote:
I’d prefer to avoid touching the “server”. It works - Windows clients
don’t have any issues connecting to it and also when I connect via
Nautilus (gvfs) everything works correctly (but as much as I’d like it
to be, it is not an option - not all apps can use gvfs and don’t show
such volumes).
So it points me that the settings I’m using fstab are at fault. WHy oh
why it needs to be so complex … How I wish there was a way to use
tech similar to what gvfs instead those cifs parameters and I wouldn’t
have to deal with all those options (and there’s ton of them - and by
reading the manuals I don’t get what some of them actually do or some
seem to be doing exactly the same thing - super confusing) and
permissions. I just want to mount the share to a specific folder in such
a way noone will have to deal with permissions and everyone on that PC
will be able to read / write (no need to worry about permissions at all
that’s why what gvfs does in this regard would be perfect for my use
case).
For me the most confusing part with the current setting is the
inconsistent behavior - can’t delete/modify in the main folder (but can
add new files / folders), but can in subfolders. Weird.
Anyways I’ll look into samba.conf and will post its contents. How it is
set up on my (client) end (and contents of my fstab) are already here -
hopefully we’ll be able to figure it out.
Hi
At the end of the day, your call. However it may get to a point since
it’s an old release (without updates) it may just stop working due to
updates to the clients (unsupported protocol versions on the server etc)
It will probably be ownership related of the user directories (server
smb.conf [home] section) by the sounds… I’m no samba guru…
–
Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
SLES 15 | GNOME Shell 3.26.2 | 4.12.14-25.22-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!
Regarding your 42.2 server,
I’d agree for now that your higher priority is to understand how it’s working with your existing LAN clients.
But,
I’d also recommend that you turn your attention to it very soon afterwards,
Because it’s no longer getting updates, with each day it’s going to become not only a more serious security risk, it could also become harder to upgrade as it falls further behind supported technologies.
If you learn and implement virtualization in your network, you’ll be able to plot a very easy, non-risky upgrade path forward so no one will notice when your upgrade happens.
[global]
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
security = user
usershare allow guests = No
workgroup = plikoskop
## Share disabled by YaST
# [netlogon]
[plikoskop]
comment =
inherit acls = Yes
valid users = @smbgrp
path = /home/samba_share/plikoskop
read only = No
vfs objects =
The thing that I don’t get is why the entry in fstab fails (mounting via cifs) while volume auto mounted via nautilus (thus gvfs) works exactly as I’d expect. Also Windows clients do not have any issues.
Oh and by “it fails” I mean that it mounts but there are this delete/modify in the main folder issues I’ve written about earlier.
Thank you Tsu. I get it - I really do. I know that in most of the times keeping your machines updated is a good idea.
But this is not “enterprise” setup with dedicated IT department. It’s just 7 non-techies trying to get the job done and working in a pretty closed environment. It’s much more likely I’ll break something after installing Leap 15 on the “server” than it actually doing any good. Especially considering that, as I mentioned, I totally suck at setting up Samba and it always trips me.
Also take into account that using brackets when I write “server” is intentional. It’s just a very old dual core PC. And it serves not only as a file dump, but also as a workstation for doing basic “office” stuff. I doubt it could handle virtualization and at the moment I lack the know-how how to set the virtualization upgrade stuff you’re mentioning (apart from setting up a kvm with passthrough using online guides I know very little about it and even with it I’m a total monkey - “do it as is written in manual” ;)). Would be awesome if you could point me to some resources I could read about it - I’d love to learn.
atm I’m checking an alternative workaround. I’m trying to use gvfs-mount command on user login. If it mounts gvfs filesystem to the same folder each time I could simply create symlink pointing to it and could consider it “done” .