Stephan Roth
2021-May-31 15:12 UTC
[Samba] LabView build directory / inherit owner / smb_set_file_dosmode not permitted
Hello all, I have the problem of an application (LabView 2019) trying to create a directory (to build an executable application in) which fails when "inherit owner = Yes" is set. According to the log, it fails when calling smb_set_file_dosmode for the directory it wants to create: [2021/05/31 16:46:25.741729, 2] ../source3/smbd/trans2.c:6271(smb_set_file_dosmode) smb_set_file_dosmode: file_set_dosmode of labviewtest/builddir failed (Operation not permitted) When I set ""inherit owner = No" the directory is created and owned by the user running the application. I'd like to keep "inherit owner = Yes". Is there a possible workaround from the Samba side to fake smb_set_file_dosmode as being permitted and ignoring the function call? I tried setting "write list = testuser" (where testuser was running the application) without success. I'm using Samba from Debian Stretch (4.5.16+dfsg-1+deb9u4) Thanks for any ideas or hints! - Stephan
Rowland penny
2021-May-31 15:43 UTC
[Samba] LabView build directory / inherit owner / smb_set_file_dosmode not permitted
On 31/05/2021 16:12, Stephan Roth via samba wrote:> Hello all, > > I have the problem of an application (LabView 2019) trying to create a > directory (to build an executable application in) which fails when > "inherit owner = Yes" is set. > > According to the log, it fails when calling smb_set_file_dosmode for > the directory it wants to create: > > [2021/05/31 16:46:25.741729,? 2] > ../source3/smbd/trans2.c:6271(smb_set_file_dosmode) > ? smb_set_file_dosmode: file_set_dosmode of labviewtest/builddir > failed (Operation not permitted) > > When I set ""inherit owner = No" the directory is created and owned by > the user running the application. > > I'd like to keep "inherit owner = Yes". > > Is there a possible workaround from the Samba side to fake > smb_set_file_dosmode as being permitted and ignoring the function call? > > I tried setting "write list = testuser" (where testuser was running the > application) without success. > > > I'm using Samba from Debian Stretch (4.5.16+dfsg-1+deb9u4) >My first thoughts are upgrade Samba, but your distro is EOL as well (OK, technically it is LTS, but it is really only getting security updates), so you should upgrade your distro and then Samba. For a really uptodate Samba version, see here: https://apt.van-belle.nl/ It will probably also help if you can post your smb.conf, so we can see exactly how you are running Samba. Rowland
Stephan Roth
2021-Jun-04 11:55 UTC
[Samba] LabView build directory / inherit owner / smb_set_file_dosmode not permitted
On 31.05.21 17:43, Rowland penny via samba wrote:> On 31/05/2021 16:12, Stephan Roth via samba wrote: >> Hello all, >> >> I have the problem of an application (LabView 2019) trying to create a>> directory (to build an executable application in) which fails when >> "inherit owner = Yes" is set. >> >> According to the log, it fails when calling smb_set_file_dosmode for >> the directory it wants to create: >> >> [2021/05/31 16:46:25.741729,? 2] >> ../source3/smbd/trans2.c:6271(smb_set_file_dosmode) >> ? smb_set_file_dosmode: file_set_dosmode of labviewtest/builddir >> failed (Operation not permitted) >> >> When I set ""inherit owner = No" the directory is created and owned by >> the user running the application. >> >> I'd like to keep "inherit owner = Yes". >> >> Is there a possible workaround from the Samba side to fake >> smb_set_file_dosmode as being permitted and ignoring the function call? >> >> I tried setting "write list = testuser" (where testuser was running the >> application) without success. >> >> >> I'm using Samba from Debian Stretch (4.5.16+dfsg-1+deb9u4) >> > > My first thoughts are upgrade Samba, but your distro is EOL as well (OK, > technically it is LTS, but it is really only getting security updates),> so you should upgrade your distro and then Samba. For a really uptodate> Samba version, see here: https://apt.van-belle.nl/ > > It will probably also help if you can post your smb.conf, so we can see> exactly how you are running Samba. > > RowlandUpgrading isn't done as quickly as we'd like to do it, due to some dependencies like BeeGFS which doesn't sync its releases to Debian releases. Anyway, the solution was easy enough after I stopped insisting on "inherit owner = Yes" and forced user/group instead. That's a tolereable exception to the standard setup we have for shares. Thanks for your feedback and sorry for bothering the list before exhausting my patience for experimentation. Stephan