From: bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r@public.gmane.org
To: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [Bug 118671] mkfifo(3) & mknod(2) and EPERM
Date: Fri, 08 Jul 2016 14:56:40 +0000 [thread overview]
Message-ID: <bug-118671-11311-dqY9cV0FjY@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-118671-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=118671
--- Comment #4 from Navin <navinp1912-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> ---
I don't think so . This is not a bug. Please see below for the details.
From mount command manpage
For most types all the mount program has to do is issue a simple
mount(2) system call, and no detailed knowledge of the filesystem type is
required.For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad
hoc code is necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems have
a separate mount program. In order to make it possible to treat all types in a
uniform way, mount will execute the program /sbin/mount.type (if that
exists) when called with type type. Since different versions of the
smbmount program have different calling conventions, /sbin/mount.smbfs may have
to be a shell script that sets up the desired call.
Now looking at mount.cifs(8)
From mount.cifs(8) from cifs-utils not related to kernel manpages.
sfu
When the CIFS Unix Extensions are not negotiated, attempt to create
device files and fifos in a format compatible with Services for Unix (SFU). In
addition retrieve bits 10-12 of the mode via the SETFILEBITS extended attribute
(as SFU does). In the future the bottom 9 bits of the mode mode also
will be emulated using queries of the security descriptor (ACL). [NB: requires
version 1.39 or later of the CIFS VFS. To recognize symlinks and be able
to create symlinks in an SFU interoperable form requires version 1.40 or
later of the CIFS VFS kernel module.
nounix
Disable the CIFS Unix Extensions for this mount. This can be useful
in order to turn off multiple settings at once. This includes POSIX acls, POSIX
locks, POSIX paths, symlink support and retrieving uids/gids/mode
from the erver. This can also be useful to work around a bug in a server that
supports Unix Extensions.
INODE NUMBERS
When Unix Extensions are enabled, we use the actual inode number
provided by the server in response to the POSIX calls as an inode number.
When Unix Extensions are disabled and "serverino" mount option is
enabled there is no way to get the server inode number. The client typically
maps the server-assigned "UniqueID" onto an inode number.
Note that the UniqueID is a different value from the server inode
number. The UniqueID value is unique over the scope of the entire server and is
often greater than 2 power 32. This value often makes programs that are not
compiled with LFS (Large File Support), to trigger a glibc EOVERFLOW error as
this won´t fit in the target structure field. It is strongly recommended to
compile your programs with LFS support (i.e. with -D_FILE_OFFSET_BITS=64) to
prevent this problem. You can also use "noserverino" mount option to generate
inode numbers smaller than 2 power 32 on the client. But you may not be able to
detect hardlinks properly.
Here is for volume smb running on ubuntu , this CIFS extensions are coming from
server
smbclient -N //127.0.0.1/Movies -c "posix"
WARNING: The "syslog" option is deprecated
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.9-Ubuntu]
Server supports CIFS extensions 1.0
Server supports CIFS capabilities locks acls pathnames posix_path_operations
large_read posix_encrypt
junk@junk-foo:~/android/samba-4.4.5/source3$ smbclient -N //127.0.0.1/Movies -c
"volume"
WARNING: The "syslog" option is deprecated
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.3.9-Ubuntu]
Volume: |Movies| serial number 0x735d0d3c
junk@junk-foo:~/android/samba-4.4.5/source3$
win10
Domain=[DESKTOP-T9GDCOU] OS=[Windows 10 Pro 10240] Server=[Windows 10 Pro 6.3]
smb: \> posix
Server doesn't support UNIX CIFS extensions.
smb: \>
root@junk-foo:/mnt/24# touch foo
root@junk-foo:/mnt/24# ls -l foo
-rwxr-xr-x 1 root root 0 Jul 8 20:11 foo
root@junk-foo:/mnt/24# mkfifo abcd
mkfifo: cannot create fifo 'abcd': Operation not permitted
root@junk-foo:/mnt/24# ls
foo
root@junk-foo:/mnt/24# mknod dev b 1 2
mknod: dev: Operation not permitted
root@junk-foo:/mnt/24# mount | grep PerfLogs
//192.168.122.12/PerfLogs on /mnt/24 type cifs
(rw,relatime,vers=1.0,cache=strict,username=junk,domain=DESKTOP-T9GDCOU,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.122.12,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)
Default mount.smbfs disables this creation below it does with nounix option and
without sfu.
Now add sfu option and mount
root@junk-foo:/mnt/24# mount | grep PerfLogs
//192.168.122.12/PerfLogs on /mnt/24 type cifs
(rw,relatime,vers=1.0,cache=strict,username=junk,domain=DESKTOP-T9GDCOU,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.122.12,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,sfu,dynperm,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)
root@junk-foo:/mnt/24# mknod devsmb b 1 2
root@junk-foo:/mnt/24# mkfifo fifosmb
root@junk-foo:/mnt/24# ls
devsmb fifosmb foo newfoo
root@junk-foo:/mnt/24# cd
root@junk-foo:~# umount /mnt/24
root@junk-foo:~#
Now without dynperm
mount.cifs //192.168.122.12/PerfLogs /mnt/24 -o
user=junk,dom=DESKTOP-T9GDCOU,sfu
Password for junk@//192.168.122.12/PerfLogs: *********
root@junk-foo:~# cd /mnt/24
root@junk-foo:/mnt/24# ls
devsmb fifosmb foo newfoo
root@junk-foo:/mnt/24# ls -l
total 1
brwxr-xr-x 1 root root 1, 2 Jul 8 20:13 devsmb
prwxr-xr-x 1 root root 0 Jul 8 20:14 fifosmb
-rwxr-xr-x 1 root root 0 Jul 8 20:11 foo
-rwxr-xr-x 1 root root 0 Jul 8 20:12 newfoo
root@junk-foo:/mnt/24# mkfifo newsmbfifo
root@junk-foo:/mnt/24# ls -l
total 1
brwxr-xr-x 1 root root 1, 2 Jul 8 20:13 devsmb
prwxr-xr-x 1 root root 0 Jul 8 20:14 fifosmb
-rwxr-xr-x 1 root root 0 Jul 8 20:11 foo
-rwxr-xr-x 1 root root 0 Jul 8 20:12 newfoo
prwxr-xr-x 1 root root 0 Jul 8 20:15 newsmbfifo
root@junk-foo:/mnt/24#
It is clear that even though the server doesn't support we can still create
fifos and mknod and if the server does support you definitely can.
--
You are receiving this mail because:
You are watching the assignee of the bug.--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-07-08 14:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-21 19:50 [Bug 118671] New: mkfifo(3) & mknod(3) and EPERM bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
[not found] ` <bug-118671-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/>
2016-05-22 18:14 ` [Bug 118671] mkfifo(3) & mknod(2) " bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2016-06-01 4:53 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2016-06-08 15:06 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2016-07-07 11:27 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2016-07-08 14:56 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r [this message]
2016-07-16 10:43 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
2016-07-16 10:44 ` bugzilla-daemon-590EEB7GvNiWaY/ihj7yzEB+6BGkLq7r
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-118671-11311-dqY9cV0FjY@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon-590eeb7gvniway/ihj7yzeb+6bgklq7r@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).