simatec / ioBroker.backitup

ioBroker.backitup allows you to backup and restore your ioBroker installation and other systems, such as databases, Zigbee, scripts and many more.
MIT License
70 stars 35 forks source link

Linux Samba share can not be mounted because of wrong value in the mount parameter uid and gid #1187

Open Andi-82 opened 20 hours ago

Andi-82 commented 20 hours ago

Describe the bug
The cifs mount command did not work correctly because it is filled with a uid and a gid which does not contain a number e.g. 1001. The Samba Server will expect a number there. I the command which will be called there the uid and the gid filled with the value "iobroker"

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Configure the instance for a backup on a cifs volume'
  2. Click on 'Create Backup'
  3. Scroll down to 'Create Backup -> klick on create CCU Backup'
  4. See error in the window which shows the mount command.

Expected behavior
I would assume that there will be no uid and gid in the mount command. In this case there it is one. But not an id like 1001 which could probably. For gid and uid is named with "iobroker", which can not work because it is not a number. If I add the same mount command without uid and gid in the expert configuration for the cifs mount, it works.

Screenshots & Logfiles
If applicable, add screenshots and logfiles to help explain your problem.

Versions:

Additional context
Add any other context about the problem here.

github-actions[bot] commented 20 hours ago

Thanks for reporting a new issue @Andi-82!

  1. Please make sure your topic is not covered in the German documentation or English documentation
  2. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
  3. Search for the issue topic in other/closed issues to avoid duplicates!
  4. Ensure that you use the latest available beta version of this adapter (not the current stable version): 3.0.31

    Otherwise this issue will be closed.

Grothesk242 commented 8 hours ago

The Samba Server will expect a number there.

That's not true. man mount.cifs says:

uid=arg sets the uid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a username or a numeric uid. When not specified, the default is uid 0. The mount.cifs helper must be at version 1.10 or higher to support specifying the uid in non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information. forceuid instructs the client to ignore any uid provided by the server for files and directories and to always assign the owner to be the value of the uid= option. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.

Please provide the error messages and your full command that you use for mounting or the respective line in your /etc/fstab. This entry in my fstab works for me:

//fritz.nas/FRITZ.NAS/Hitachi-HTS12345678-01/iobbackups/chet /opt/iobroker/backups cifs credentials=/home/iobroker/.smbcredentials,users,noserverino,noauto,rw,forceuid,uid=iobroker,forcegid,gid=iobroker,file_mode=0770,dir_mode=0770,vers=3.1.1 0 0