Bug 10790 - fchown with posix extensions to Samba fails with access denied
Summary: fchown with posix extensions to Samba fails with access denied
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-29 00:47 UTC by Steve French
Modified: 2014-10-13 10:52 UTC (History)
1 user (show)

See Also:


Attachments
wireshark trace of running the script above to Samba 4.2 master (3.27 KB, application/x-pcapng)
2014-08-29 00:47 UTC, Steve French
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve French 2014-08-29 00:47:48 UTC
Created attachment 10238 [details]
wireshark trace of running the script above to Samba 4.2 master

The following works locally but fails remotely over cifs to Samba 4.2 master (similar to what causes xfstest generic/088 to fail)

#!/usr/bin/env python
#
# Test chmod

import os, grp, pwd, sys

filename = raw_input("Enter a file name to create: ")

uid = pwd.getpwnam("nobody").pw_uid
gid = grp.getgrnam("nogroup").gr_gid
# create a new file with us as owner
fd = os.open(filename, os.O_RDWR | os.O_CREAT)
os.fchown(fd, uid, gid)
os.close(fd)
Comment 1 Steve French 2014-08-29 01:22:16 UTC
xfstest generic/088 fails as a result of the equivalent problem. See below

QA output created by 088
fchown: Permission denied
Comment 2 Steve French 2014-08-29 03:06:07 UTC
User error - my userid was not correctly mapped to root

This test case must be run as root