Ubuntu 18.04 Samba share out of the blue is really slow

I’ve had a samba share setup on my ubuntu 18.04 server for a few months now, all running very smooth and very fast over my gigabit ethernet from the ubuntu server to another ubuntu laptop running 19.04 as well as a windows 10 laptop.

All of a sudden today, trying to access my share from my ubuntu laptop or windows laptop has been extremely laggy. Any file transfers are at around 2-3MB/s when it should be hovering around 100MB/s.

I’ve re-installed samba, restarted every device connected to my network.

I followed the steps in this tutorial: https://linuxize.com/post/how-to-install-and-configure-samba-on-ubuntu-18-04/

here is my smb.conf for the share.

[myusername-share] path = /mnt/storage browseable = yes read only = no force create mode = 0660 force directory mode = 2770 valid users = @sambashare @sadmin

I’am running Ubuntu 18.04.2 LTS failed to install samba

noname@star-death-console:~$ apt-get install samba E: Could not open lock file /var/lib/dpkg/lock-frontend – open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? noname@star-death-console:~$ su root Password: su: Authentication failure noname@star-death-console:~$ su root Password: root@star-death-console:/home/noname# apt-get install samba Reading package lists… Done Building dependency tree
Reading state information… Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: samba : Depends: python (< 2.8) but it is not going to be installed Depends: python-dnspython but it is not going to be installed Depends: python-samba but it is not going to be installed Depends: samba-common-bin (= 2:4.7.6+dfsg~ubuntu-0ubuntu2) but it is not going to be installed Depends: python (>= 2.7~) but it is not going to be installed Depends: python2.7:any Depends: python:any (< 2.8) Depends: python:any (>= 2.7~) Depends: samba-libs (= 2:4.7.6+dfsg~ubuntu-0ubuntu2) but 2:4.7.6+dfsg~ubuntu-0ubuntu2.6 is to be installed Recommends: attr Recommends: samba-dsdb-modules but it is not going to be installed Recommends: samba-vfs-modules but it is not going to be installed E: Unable to correct problems, you have held broken packages. root@star-death-console:/home/noname#

Connect to Samba with Windows 10 – AD issue…?

I am running a samba file server at home on a Ubuntu 18.04 server. I can connect to it successfully using my Win 10 home laptop, but when I try to connect using my Win 10 work laptop I get a ‘Windows cannot access 2.168.1.100\public’ error message.

My home laptop is in the default WORKGROUP workgroup, but my work laptop is part of a work.net domain. Would this prevent me connecting to the file share using my work.net laptop?

My smb.conf file is:

[global] workgroup = WORKGROUP server string = File Server security = user map to guest = Bad User  [files] path = /srv/samba available = yes public = yes read only = no guest ok = yes browseable = yes vfs object = recycle     recycle:repository = /srv/samba/RecycleBin     recycle:keeptree = yes     recycle:versions = yes     recycle:exclude = *.tmp,*.temp     recycle:exclude_dir = RecycleBin 

Samba and Ubuntu 16.04 file permission problems on renderfarm

I have searched all over looking for a solution to my problem but sadly I cannot seem to find it and I am lost now. A little background on this problem…

I have a very small scale renderfarm in my house now, with Blender 2.80, I am using a renderfarm manager called CGRU/Afanasy : http://cgru.info/ But that part is running fine, I have my render node seeing the server just fine and they can communicate between each other, the problem lies when Blender tries to write out it’s render to my Samba share it gets a permission denied error.

I know Samba for Linux is not exactly the best option compared to NFS but I also want to access this share with Windows – so Samba it is. Also I am not concerned so much with tight security at this time, it just needs to be able to write to the share.

My smb config file share entry :

[widowfarm]    comment = Renderfarm    path = /media/renderfarm    browseable = yes    writable = yes    read only = no    guest ok = yes    create mask = 0777    directory mask = 0777 

I had the create and directory masks set at 0775 at first but changed them.

I ‘ls -l’ my directory and see my permissions… (mind you I still get confused by these)

drwxr-x---+ 3 root     root     4096 Sep 21 13:17 farishta drwxrwxrwx  4 farishta farishta 4096 Sep 27 09:03 renderfarm farishta@redwidow03:/media$   cd renderfarm farishta@redwidow03:/media/renderfarm$   ls -l total 46724 -rw-rw-r--  1 render   render      75449 Sep 27 09:02 0002.png -rw-rw-r--  1 nobody   nogroup         0 Sep 27 09:02 0003.png -rw-rw-r--  1 render   render      75449 Sep 27 09:03 0004.png -rw-rw-r--  1 render   render      75449 Sep 27 09:03 0005.png drwxrwxr-x 13 farishta farishta     4096 Sep 26 06:44 PROJECT_WIDOW drwxrwxr-x  2 nobody   nogroup      4096 Sep 25 23:53 scn_001_shot_003 -rwxrwxrwx  1 farishta farishta 23460048 Aug 16  2018 Subway_train_15.blend -rw-rw-r--  1 farishta farishta 17952340 Sep 20 23:37 Subway_train_SHADERDEV_16.blend -rw-rw-r--  1 farishta farishta   683552 Sep 26 06:56 test_002.20190926065643.blend -rw-rw-r--  1 farishta farishta   684680 Sep 26 07:00 test_002.20190926070029.blend -rw-rw-r--  1 farishta farishta   684680 Sep 26 07:00 test_002.blend -rw-rw-r--  1 farishta farishta   683548 Sep 26 06:56 test_002.blend1 -rw-r--r--  1 nobody   nogroup    695976 Sep 19 10:09 test.20190919100900.blend -rw-r--r--  1 nobody   nogroup    682188 Sep 19 10:10 test.20190919101045.blend -rw-r--r--  1 nobody   nogroup    682188 Sep 19 10:10 test.blend -rw-r--r--  1 nobody   nogroup    695636 Sep 19 10:08 test.blend1 -rw-rw-r--  1 farishta farishta   681012 Sep 18 12:17 untitled.blend farishta@redwidow03:/media/renderfarm$     

User ‘farishta’ is my account… maybe this has something to do with it? I also have a ‘farishta’ account on the render node. Again security is not tight here at the moment.

When installing CGRU it makes a new user called ‘render’ as well as a group called ‘render’. When the farm gets a job, it uses the ‘render’ user to run Blender.

The server node also runs a render user, my server can write to the share just fine.

On the render and server node I installed the CIFS package so I can mount this share. I plan to mount this share in fstab so that upon reboot it will mount it but that is another story for another time.

So on the render node I log in under ‘farishta’ and open up a terminal and enter this :

sudo mount -t cifs -o username=render //serverip/widowfarm /media/renderfarm 

Which gives me a password prompt, I enter it, everything seems fine? Not sure how to tell if it succeeded logged in from a different account I just “assume” as I get no errors.

In Blender, the addon for CGRU/Afanasy sends a job to the farm successfully, the render node starts and completes it’s render but fails.

 Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04) /run/user/1001/gvfs/ non-existent directory found bundled python: /opt/blender-2.80/2.80/python Read blend: /media/renderfarm/test_002.20190926070029.blend  .... a bunch of Blender related output...  Fra:3 Mem:9.15M (0.00M, Peak 11.25M) | Time:00:16.75 | Sce: Scene Ve:0 Fa:0 La:0 imb_savepng: Cannot open file for writing: '/media/renderfarm/0003.png' Error: Render error (Invalid argument) cannot save: '/media/renderfarm/0003.png'  Time: 00:17.08 (Saving: 00:00.32)   Blender quit /media/renderfarm/0003.png: Permission denied 

So I know it’s GOT to be permissions or users and groups related, I am just confused and a little lost…. what am I doing wrong here?

Thanks in advance for any help

Windows AD users are not able access samba share whereas few user can access it

smb.conf [global] security = ADS workgroup = EUCARRIER realm = EU.CARRIER.UTC.COM client use spnego = yes server signing = auto server string = Samba Server winbind enum users = yes winbind enum groups = yes winbind use default domain = yes

idmap config * : backend = tdb idmap config * : range = 10000-20000  template shell = /bin/bash log file = /var/log/samba/log.%m max log size = 50 load printers = no 

[scanin2] path = /data2/scan/in2 valid users = +”EUCARRIER\fr_mtl_carrier_user” public = yes browseable = yes printable = no comment = scanFolderFromMFD writeable = yes guest ok = no hosts allow = 172.30.

Samba share command line question

I’m running an Ubuntu server guest with Virtualbox connected via a host-only network to my host which is an ubuntu 19.04 desktop.

I’m looking for a method to use samba shares to mount shared folders from the host via my host-only network to the guest where the commands are run from the host. The host folders need to be mounted to the guest or rather, the hosts data needs to be persistent on the host once the connection is closed.

This is not the standard:

sudo mount -t smbfs -o user=xxx //192.168.xxx.xxx/host-folder /guest-folder

It would be more like:

sudo mount -t smbfs -o user=xxx /guest-folder//192.168.xxx.xxx/host-folder

Naturally, it doesn’t work that way.

So, any ideas or suggestions for how to go about this.

To sum up – I need to run a command from the host to mount my host folders to the guest (in order to make the host folders persistent once the virtual server is shutdown

Thanks

ps – you may ask why I don’t use the shared folders with virtualbox, the reason is that once they are mounted it causes huge upline permissions issues that I’d rather not get into 🙂

Having to chmod my samba shares to 0777 feels wrong just to get them to be writeable. Is this really necessary?

Since setting up my samba shares I have been unable to write to either of them. My config:

[minecraft]         path = /opt/minecraft         writeable = yes         browseable = yes         read only = no         guest ok = yes         create mask = 0777  [www]         path = /var/www         writeable = yes         read only = no         browseable = yes         guest ok = yes         create mask = 0777 

I am unable however to write to either of these shares from a Windows machine. I have the folders themselves (and all subfolders) at 755, but still nothing.

The only thing that has allowed me to get the shares to be writeable is making them and their subfolders 777 and that just feels wrong.

Am I missing something?