如何在 Linux 中将 nouser 分配给 someuser

如何在 Linux 中将 nouser 分配给 someuser

在我的 samba 共享中,我看到当有人从 MAC 创建新文件夹时user = nouser,当我使用 rsync 时出现权限被拒绝错误。

是否有可能在 Samba 中,如果没有用户,则分配 soe 用户,或者

在Linux中,user1对所有用户都具有所有权限

答案1

您可以在共享配置下使用force userforce group将文件写入共享时默认为特定用户和组。

答案2

man smb.conf告诉我参数:

   guest account (G)

   This is a username which will be used for access to services which are specified as guest ok (see below). Whatever privileges this user has will be
   available to any client connecting to the guest service. This user must exist in the password file, but does not require a valid login. The user
   account "ftp" is often a good choice for this parameter.

   On some systems the default guest account "nobody" may not be able to print. Use another account in this case. You should test this by trying to log
   in as your guest user (perhaps by using the su - command) and trying to print using the system print command such as lpr(1) or
    lp(1).

   This parameter does not accept % macros, because many parts of the system require this value to be constant for correct operation.

   Default: guest account = nobody     # default can be changed at compile-time

我怀疑如果你在[global]smb.conf 部分中设置/更改它,它就会执行你想要的操作。

相关内容