Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
2
votes
1
answers
5039
views
How to open NFS log
I'm using Omnios (Unix) and i want to log everything about nfs. I have some VM on my NFS share and sometimes connection brokes 3-5 second. I can not find a reason for that on dmesg or syslog. I can watch SMB logs from "dmesg" but nfs logs not writing there. I think i need to open my logs someway. An...
I'm using Omnios (Unix) and i want to log everything about nfs.
I have some VM on my NFS share and sometimes connection brokes 3-5 second.
I can not find a reason for that on dmesg or syslog.
I can watch SMB logs from "dmesg" but nfs logs not writing there.
I think i need to open my logs someway.
Any help works. Ty.
Ozbit
(439 rep)
Mar 2, 2017, 03:17 PM
• Last activity: Aug 30, 2024, 01:02 PM
14
votes
2
answers
13860
views
What are pros to use OmniOS than SmartOS or OpenIndiana?
I could not find *good* comparison between OmniOS and SmartOS (or OpenIndiana). So what are pros to use OmniOS than SmartOS? (As some people are nitpickers I had to make the question like this. But I would like to know pros/cons...)
I could not find *good* comparison between OmniOS and SmartOS (or OpenIndiana). So what are pros to use OmniOS than SmartOS?
(As some people are nitpickers I had to make the question like this. But I would like to know pros/cons...)
jirib
(1188 rep)
Oct 16, 2013, 11:10 AM
• Last activity: Feb 15, 2023, 09:51 AM
0
votes
1
answers
60
views
saslauthd works when run 'standalone' but not when run by OmniOS svcadm
If I run `saslauthd` via `svcadm` it does not work, but if I run it from the command-line, it does. ``` u@h:w$ svcadm enable saslauthd u@h:w$ ps -ef|grep sasl root 17192 14073 0 05:50:12 ? 0:00 /opt/ooce/sbin/saslauthd -a sasldb -c -m /var/run/saslauthd root 17194 17102 0 05:50:31 pts/3 0:00 grep sa...
If I run
saslauthd
via svcadm
it does not work, but if I run it from the command-line, it does.
u@h:w$ svcadm enable saslauthd
u@h:w$ ps -ef|grep sasl
root 17192 14073 0 05:50:12 ? 0:00 /opt/ooce/sbin/saslauthd -a sasldb -c -m /var/run/saslauthd
root 17194 17102 0 05:50:31 pts/3 0:00 grep sasl
u@h:w$ /opt/ooce/sbin/testsaslauthd -p topsikrit -u imapuser
0: NO "authentication failed"
u@h:w$ svcadm disable saslauthd
u@h:w$ /opt/ooce/sbin/saslauthd -a sasldb -c -d -V -m /var/run/saslauthd
saslauthd :num_procs : 5
saslauthd :mech_option: NULL
saslauthd :run_path : /var/run/saslauthd
saslauthd :auth_mech : sasldb
...
[ switch to another tty]
u@h:w$ /opt/ooce/sbin/testsaslauthd -p topsikrit -u imapuser
0: OK "Success."
The _only difference_, so far as I can see, between the two modes of running of saslauthd
is that one was launched by the svcadm
framework and the other, from the command line. But the user (root
-- despite the $
in the prompt) is the same, and the arguments, (apart from -V
and -d
) are also the same. So why won't saslauthd
authenticate in the first case, but will in the second?
The above commands were run in a sparse zone.
Everything works as it should if I switch to the _passwd_ mechanism but I would prefer to use _sasldb_.
Michael NGV
(1 rep)
May 9, 2022, 11:57 AM
• Last activity: May 9, 2022, 10:33 PM
1
votes
0
answers
38
views
Adding periodical ZFS snapshots as SMF service (svc) in OmnioOS Community Edition
I'm very much a novice and an amateur when it comes to Solaris-based operating systems, but I've played around with both Solaris and OpenIndiana. Anyway, I'm currently toying with OmniOS Community Edition, and I have noticed that all the SMF-services for taking periodical ZFS snapshots (eg. hourly,...
I'm very much a novice and an amateur when it comes to Solaris-based operating systems, but I've played around with both Solaris and OpenIndiana. Anyway, I'm currently toying with OmniOS Community Edition, and I have noticed that all the SMF-services for taking periodical ZFS snapshots (eg. hourly, daily, &c) are - as far as I can tell - missing (not just not enabled). They appear to not be present at the system at all (although I may be wrong).
So is it possible to install/activate (which packet?) ZFS-snapshots for OmniOS - if so, how?
If not, is it possible for me to write my own SMF script(s) (any good tutorials for for how to write SMF scripts in OmniOS)? [I'm aware I could simply add entries to make snapshots in crontab or associate files, but I'd prefer the SMF route.]
Baard Kopperud
(7253 rep)
May 11, 2021, 07:43 PM
0
votes
0
answers
1453
views
/dev/tun vs /dev/net/tun
I am mounting the /dev/tun device of an IllumOS installation (actually OmniOS, but I don't think it makes a difference) inside a lx-brand zone (using add device, set match=\dev\tun, end). Problem is, the CentOS inside the zone expects the tun device to be in /dev/net/tun, not /dev/tun, so OpenVPN is...
I am mounting the /dev/tun device of an IllumOS installation (actually OmniOS, but I don't think it makes a difference) inside a lx-brand zone (using add device, set match=\dev\tun, end). Problem is, the CentOS inside the zone expects the tun device to be in /dev/net/tun, not /dev/tun, so OpenVPN is not working. It complains that /dev/net/tun does not exist, which I guess makes sense.
What is the difference between having the tun device in /dev or in /dev/net? More importantly, how can I make this work? I have tried symlinking /dev/tun in /dev/net/tun both in IllumOS and in CentOS, but it's not letting me.
Any help is appreciated.
EDIT: Thanks to the comments I am now able to trick the system into believing that /dev/net/tun exists, however even when trying
tunctl -t tun0 -f /dev/tun
I get TUNSETIFF: Inappropriate ioctl for device
. The full strace is below:
execve("/sbin/tunctl", ["tunctl", "-t", "tun0", "-f", "/dev/tun"], [/* 20 vars */]) = 0
brk(NULL) = 0x6020e0
uname({sysname="Linux", nodename="centos-zerotier", ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffef240000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=26396, ...}) = 0
mmap(NULL, 26396, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fffef040000
close(3) = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\35\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2127336, ...}) = 0
mmap(NULL, 3940800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fffeec00000
mprotect(0x7fffeedb8000, 2097152, PROT_NONE) = 0
mmap(0x7fffeefb8000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b8000) = 0x7fffeefb8000
mmap(0x7fffeefbe000, 16832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fffeefbe000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffef030000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffef020000
arch_prctl(ARCH_SET_FS, 0x7fffef020740) = 0
mprotect(0x7fffeefb8000, 16384, PROT_READ) = 0
mprotect(0x601000, 4096, PROT_READ) = 0
mprotect(0x7fffef421000, 4096, PROT_READ) = 0
munmap(0x7fffef040000, 26396) = 0
open("/dev/tun", O_RDWR) = 3
stat("/etc/sysconfig/64bit_strstr_via_64bit_strstr_sse2_unaligned", 0x7fffffefefb0) = -1 ENOENT (No such file or directory)
ioctl(3, TUNSETIFF, 0x7fffffeff460) = -1 ENOTTY (Inappropriate ioctl for device)
dup(2) = 4
fcntl(4, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
brk(NULL) = 0x6020e0
brk(0x6230e0) = 0x6230e0
brk(NULL) = 0x6230e0
brk(0x624000) = 0x624000
fstat(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffef010000
write(4, "TUNSETIFF: Inappropriate ioctl f"..., 42TUNSETIFF: Inappropriate ioctl for device
) = 42
close(4) = 0
munmap(0x7fffef010000, 8192) = 0
brk(NULL) = 0x624000
brk(NULL) = 0x624000
brk(0x623000) = 0x623000
brk(NULL) = 0x623000
exit_group(1) = ?
+++ exited with 1 +++
Francesco Carzaniga
(101 rep)
Mar 20, 2020, 07:19 PM
• Last activity: Mar 20, 2020, 09:08 PM
2
votes
1
answers
757
views
How To Read Variable Value Using mdb?
Let's say I set a parameter with the following command, how could I read it back later on? `mdb -kwe "spa_load_verify_metadata/W 0"` I am trying to read the [man page][1], but I'm only in this OS temporarily and don't understand what it's talking about. The search modifiers are: l Search for the spe...
Let's say I set a parameter with the following command, how could I read it back later on?
mdb -kwe "spa_load_verify_metadata/W 0"
I am trying to read the man page , but I'm only in this OS temporarily and don't understand what it's talking about.
The search modifiers are:
l Search for the specified 2-byte value.
L Search for the specified 4-byte value.
M Search for the specified 8-byte value.
I would normally expect that value to be in /sys/modules/zfs/parameters/spa_load_verify_metadata
where I could just cat
the value, but /sys
doesn't even exist.
I tried finding the variable using find
, but it wasn't in the filesystem. I don't understand the concept of where these values are...
I'm actually just trying to read the values of other parameters that I know to exist .
Louis Waweru
(195 rep)
Feb 29, 2020, 01:35 AM
• Last activity: Mar 1, 2020, 01:07 AM
3
votes
1
answers
532
views
How to force OmniOS (illumos) "format" properly recognize disk geometry?
I have a FreeBSD-initialised 8-disk vdev, all 10TB WD RED, now on a server with OmniOS r151026, connected via LSI 3008 HBA. At POST, the card shows all disks with right geometry (I can post picture if necessary). But `format` reports a wrong (~ 2TB) geometry: format Searching for disks...done c0t500...
I have a FreeBSD-initialised 8-disk vdev, all 10TB WD RED, now on a server with OmniOS r151026, connected via LSI 3008 HBA.
At POST, the card shows all disks with right geometry (I can post picture if necessary).
But
format
reports a wrong (~ 2TB) geometry:
format
Searching for disks...done
c0t5000CCA26BD0CAFAd0: configured with capacity of 2047.71GB
c0t5000CCA26BD5AAC5d0: configured with capacity of 2047.71GB
c0t5000CCA26BD6B9CCd0: configured with capacity of 2047.71GB
c0t5000CCA26BD6C6D4d0: configured with capacity of 2047.71GB
c0t5000CCA26BD6E59Cd0: configured with capacity of 2047.71GB
c0t5000CCA26BD59F6Dd0: configured with capacity of 2047.71GB
c0t5000CCA26BD116ACd0: configured with capacity of 2047.71GB
c0t5000CCA26BD6960Ed0: configured with capacity of 2047.71GB
format
should instead report something like (only first drive listed):
AVAILABLE DISK SELECTIONS:
0. c0t5000CCA26BD0CAFAd0
/scsi_vhci/disk@g5000cca26bd0cafa
diskinfo
correctly reports size (showing only first disk):
root@omniosce:~# diskinfo -p
TYPE DISK VID PID SIZE RMV SSD
SCSI c0t5000CCA26BD0CAFAd0 ATA WDC WD100EFAX-68 10000831348736 no no
How to force OmniOS (illumos) "format" properly recognize disk geometry?
Thank you in advance.
Edit 2018-06-02: Added disk kind and expected result (thanks to @andrew-henle)
gsl
(298 rep)
Jun 1, 2018, 01:09 PM
• Last activity: Apr 18, 2019, 07:08 AM
4
votes
2
answers
1491
views
How to source correct startup scripts on interactive, non-login shell
I'm trying to set up a sane/usable environment in a barebones OpenSolaris-derivative (OmniOS, a distribution of Illumos/OpenIndiana). I have all the plumbing code I need in .profile, .inputrc, and .bashrc files ready to promote to system-wide use, but no system-wide scripts are being sourced for non...
I'm trying to set up a sane/usable environment in a barebones OpenSolaris-derivative (OmniOS, a distribution of Illumos/OpenIndiana). I have all the plumbing code I need in .profile, .inputrc, and .bashrc files ready to promote to system-wide use, but no system-wide scripts are being sourced for non-login shells. Bash attempts to load the user's .bashrc file on su, but $HOME (and any other environment variables) remains configured for the previous user.
Output from a direct (SSH) login:
login as: myuser
Using keyboard-interactive authentication.
Password:
/etc/profile run
myuser's .bashrc run
myuser's .profile run
myuser@Helios:~$ echo ~
/home/myuser
myuser@Helios:~$
Output switching user:
root@Helios:/etc# su myuser
bash: /root/.bashrc: Permission denied
bash-4.2$ id
uid=1001(myuser) gid=100(users) groups=100(users),27(sudo)
bash-4.2$ echo ~
/root
bash-4.2$
Note in particular the attempt to source root's .bashrc instead of myuser's .bashrc.
su (without additional arguments) has always worked seamlessly in Ubuntu, Fedora, etc. and I intend to replicate that experience, but what can I do when no system-wide scripts run and the user's scripts cannot be found? I'm inclined to blame OmniOS's version of bash and/or su for missing something, but what exactly is the correct behavior? Can I configure/access/script additional plumbing somewhere which addresses the failure to update $HOME and other envvars?
Further notes:
- there is no man bash in OmniOS (at least not using MANPATH=/opt/omni/share/man:/opt/mysql55/man:/opt/gcc-4.4.4/man:/usr/gnu/share/man:/usr/local/man:/usr/local/share/man:/usr/man:/usr/share/man)
- /etc/bashrc and /etc/bash.bashrc never get sourced (which is expected as this is apparently a distribution-specific convention, but Ubuntu does appear to be loading these without reference from .bashrc)
HonoredMule
(313 rep)
Jul 29, 2013, 08:09 AM
• Last activity: Apr 5, 2019, 10:59 PM
2
votes
1
answers
342
views
How to troubleshoot disk controller on Illumos based systems?
I am using OmniOS which is based off of Illumos. I have a ZFS pool of two SSD's that are mirrored; the pool, known as `data` is reporting its `%b` as 100; below is `iostat -xn`: r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device 0.0 8.0 0.0 61.5 8.7 4.5 1092.6 556.8 39 100 data Unfortunately, th...
I am using OmniOS which is based off of Illumos.
I have a ZFS pool of two SSD's that are mirrored; the pool, known as
data
is reporting its %b
as 100; below is iostat -xn
:
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.0 8.0 0.0 61.5 8.7 4.5 1092.6 556.8 39 100 data
Unfortunately, there is not actually a lot of throughput going on; iotop
reports about 23552
bytes a second.
I also ran iostat -E
and it reported quite a bit of Transport Errors
; we changed the port and they went away.
I figured there might be an issue with the drives; SMART reports no issues; I've ran multiple smartctl -t short
and smartctl -t long
; no issues reported.
I ran fmadm faulty
and it reported the following:
--------------- ------------------------------------ -------------- ---------
TIME EVENT-ID MSG-ID SEVERITY
--------------- ------------------------------------ -------------- ---------
Jun 01 18:34:01 5fdf0c4c-5627-ccaa-d41e-fc5b2d282ab2 ZFS-8000-D3 Major
Host : sys1
Platform : xxxx-xxxx Chassis_id : xxxxxxx
Product_sn :
Fault class : fault.fs.zfs.device
Affects : zfs://pool=data/vdev=cad34c3e3be42919
faulted but still in service
Problem in : zfs://pool=data/vdev=cad34c3e3be42919
faulted but still in service
Description : A ZFS device failed. Refer to http://illumos.org/msg/ZFS-8000-D3
for more information.
Response : No automated response will occur.
Impact : Fault tolerance of the pool may be compromised.
Action : Run 'zpool status -x' and replace the bad device.
Like it suggests I ran zpool status -x
and it reports all pools are healthy
.
I ran some DTraces and found that all the IO activity is from `` (for the file); which is metadata; so there actually isn't any file IO going on.
When I run kstat -p zone_vfs
it reports the following:
zone_vfs:0:global:100ms_ops 21412
zone_vfs:0:global:10ms_ops 95554
zone_vfs:0:global:10s_ops 1639
zone_vfs:0:global:1s_ops 20752
zone_vfs:0:global:class zone_vfs
zone_vfs:0:global:crtime 0
zone_vfs:0:global:delay_cnt 0
zone_vfs:0:global:delay_time 0
zone_vfs:0:global:nread 69700628762
zone_vfs:0:global:nwritten 42450222087
zone_vfs:0:global:reads 14837387
zone_vfs:0:global:rlentime 229340224122
zone_vfs:0:global:rtime 202749379182
zone_vfs:0:global:snaptime 168018.106250637
zone_vfs:0:global:wlentime 153502283827640
zone_vfs:0:global:writes 2599025
zone_vfs:0:global:wtime 113171882481275
zone_vfs:0:global:zonename global
The high amount of 1s_ops
and 10s_ops
are very concerning.
I'm thinking that it's the controller but I can't be sure; anyone have any ideas? Or where I can get more info?
user26053
Jun 3, 2015, 07:29 PM
• Last activity: Feb 4, 2019, 12:50 PM
2
votes
1
answers
218
views
Solaris11: can be installed as zone on omnios or similar?
I can install Solaris11 as qemu vm on Omnios,my question is: is possible (maybe using an archiveadm "flash" archive) to install Solaris11 as zone of Omnios?
I can install Solaris11 as qemu vm on Omnios,my question is: is possible (maybe using an archiveadm "flash" archive) to install Solaris11 as zone of Omnios?
elbarna
(13690 rep)
Feb 27, 2018, 07:33 PM
• Last activity: Dec 13, 2018, 01:15 PM
2
votes
1
answers
307
views
How to improve rsync execution time on OmniOS (illumos-based)?
I am testing illumos in some of its variants, currently OmniOS. As I was benchmarking io-bound processes, I saw that `rsync` was significantly slower in respect to my reference, FreeBSD 12-CURRENT. Using same hardware, same command with same source and target disks: In OmniOS r151026 I measured, tes...
I am testing illumos in some of its variants, currently OmniOS.
As I was benchmarking io-bound processes, I saw that
rsync
was significantly slower in respect to my reference, FreeBSD 12-CURRENT.
Using same hardware, same command with same source and target disks:
In OmniOS r151026 I measured,
test@omniosce:~# time rsync -aPt /zarc/images /home/test/
real 17m25.428s
user 28m33.792s
sys 2m46.217s
In FreeBSD 12-CURRENT:
test@freebsd:~ % time rsync -aPt /zarc/images /home/test/
374.651u 464.028s 11:30.63 121.4% 567+210k 791583+780083io 2pf+0w
(Note that FreeBSD 12-CURRENT contains debug switches, so it runs slower than future upcoming RELEASE version).
- I noticed that, under FreeBSD, rsync
was running as 3 processes, all with nice=0
, two of them **consistently using 50% to 70% CPU time**.
- On OmniOS, rsync
was also running as 3 processes, also with nice=0
, but **each one never more than 3%**.
Is the CPU usage the reason execution time on same hardware is so different on FreeBSD and illumos?
If so, since nice
was the same on both OS, why illumos does not allow higher CPU usage?
How could one improve rsync
execution time on illumos-based OS?
Thank you in advance.
---
## 2018-06-02 edit:
- Clarified question to make it more specific. Thanks to @rui-f-ribeiro
- Answering to @roaima:
1. The source and destination filesystems are both local disks
2. This is not a one-off run for each OS, I have been testing this puzzling situation with many repetitions
3. At ever test I am making sure the destination directory tree is completely empty of files matching those in the source
gsl
(298 rep)
Jun 2, 2018, 09:07 AM
• Last activity: Jun 15, 2018, 12:47 PM
3
votes
1
answers
391
views
Omnios having problems using Zone with ZFS NFS dataset
I am experimenting with Omnios trying to attempt creating a shared zfs dataset using zfs inbuilt nfs inside a zone but every time I attempt to do so I get the following message zfs create -o casesensitivity=mixed -o nbmand=on -o mountpoint=/dat/share -o sharenfs=rw=@192.168.1.0/24 dat/share cannot s...
I am experimenting with Omnios trying to attempt creating a shared zfs dataset using zfs inbuilt nfs inside a zone but every time I attempt to do so I get the following message
zfs create -o casesensitivity=mixed -o nbmand=on -o mountpoint=/dat/share -o sharenfs=rw=@192.168.1.0/24 dat/share
cannot set property for 'dat': 'sharenfs' cannot be set in a non-global zone
So I take this as a sign that you can't use zfs nfs inside a zone so I've attempt to create the zfs nfs share out of the zone and I get the exact same error.
cannot create 'dat/share': 'mountpoint' cannot be set on dataset in a non-global zone
So now I am stumped and after a couple of hours of fiddling and googling around I am hoping someone can shed some light on what I am doing wrong here.
user152044
Jan 3, 2017, 11:28 AM
• Last activity: Mar 2, 2018, 06:33 AM
1
votes
1
answers
254
views
Why "cfgadm" does not show "med-changer" device of SAS attached tape-library?
Trying to set up a tape library **NEOs StorageLoader** LTO7 and also old **PowerVault 124T** I am facing following problem and cannot find any helpful answer. Using either **Openindiana 151a8**, **Openindiana Hipster 2017.4** or current **SmartOS** none of them creates device for tape-changer LUN1 (...
Trying to set up a tape library **NEOs StorageLoader** LTO7 and also old **PowerVault 124T** I am facing following problem and cannot find any helpful answer.
Using either **Openindiana 151a8**, **Openindiana Hipster 2017.4** or current **SmartOS** none of them creates device for tape-changer LUN1 (to be used by **mtx**). Only tape-drive device (LUN0) is shown:
user@server1:~# cfgadm -al
Ap_Id Type Receptacle Occupant Condition
...
c3::rmt/1 tape connected configured unknown
...
Which maps to /dev/rmt/1 and is perfectly usable by **mt** tool.
I have read a lot about using **devfsadm -C -v** and booting with reconfigure option but nothing solved situation.
How to get **/dev/scsi/changer/...** for **mtx** ?
BTW: Tape library is attached to LSI 9207-4i4e HBA controller and OS driver for this is **mpt_sas**, which seems to see LUN1 according to LSIUtil and boot screen output. /var/adm/messages does not show any useful info execpt a warning, that multipathing will be disabled due to invalid WWN of tape-changer.
NorbertM
(131 rep)
Jul 14, 2017, 02:17 PM
• Last activity: Jul 14, 2017, 02:38 PM
2
votes
1
answers
436
views
Permissions (ACL) to allow creation of new files only - are extended attributes also needed?
I want to use a directory as a sort of drop-off point, similar to the Public folder in each Mac OS X home directory, that is: certain users (or everyone) should be able to create new files inside this directory, but nothing else - no new subdirectories, no modification or overwriting of existing fil...
I want to use a directory as a sort of drop-off point, similar to the Public folder in each Mac OS X home directory, that is: certain users (or everyone) should be able to create new files inside this directory, but nothing else - no new subdirectories, no modification or overwriting of existing files, no reading of any kind etc.
The system where this takes place is OmniOS/Solaris with ZFS, shared with the Solaris CIFS module as a SMB share. Therefore, I read the documentation on the ACL model and after some trial and error got it working with just
/usr/bin/chmod A+user:alice:-w------------:-------:allow /pool/share/dropbox
Without any inheritance, the dropped files will only have the name of
alice
as owner, but as she has no permissions at all on the individual files, she is not listed anywhere else (for example, via /usr/bin/ls -V .
).
---
Although this does what I want, I wonder if this is the correct way to do it or if I should add any other permissions explicitly, for example permissions W
(write extended attributes) or A
(change timestamp/attributes).
While testing I noticed that if one wants to also grant read properties to the directory and files, an additional ACE is needed (one for files only with one level of propagation and one for the directory itself):
A+user:alice:r-x---aAR-c--s:f--n---:allow
A+user:alice:rwx-----------:-------:allow
Now I wonder - if those additional attribute values are needed for reading, wouldn't they also be needed for writing? Do I lose anything valuable later on, or is this more of a *"If you don't know it, you don't need it!"* thing?
user121391
(1322 rep)
Feb 23, 2016, 03:15 PM
• Last activity: Mar 7, 2017, 09:14 PM
3
votes
1
answers
1339
views
Inheriting group write permission, but not execute for files, on OmniOS (Illumos) using ZFS ACL
We operate with `umask 027` most of the time. For certain directories, where multiple users are involved, I found a cool way to emulate `umask 002` using ACL inheritance. Here's the command I'm using. Essentially this is `chmod 775` with inheritance: /usr/bin/chmod A=owner@:rwxpDaARWcCos:fd:allow,gr...
We operate with
umask 027
most of the time. For certain directories, where multiple users are involved, I found a cool way to emulate umask 002
using ACL inheritance.
Here's the command I'm using. Essentially this is chmod 775
with inheritance:
/usr/bin/chmod A=owner@:rwxpDaARWcCos:fd:allow,group@:rwxpDaARWcs:fd:allow,everyone@:rxaRcs:fd:allow $@`
*$@
represents the list of files to be updated. I'm using the OpenSolaris edition in /usr/bin/chmod
, since /usr/gnu/bin/chmod
doesn't appear to support full ACL syntax.*
Works like a charm, and also sets g+s
so the group name is inherited. However, there are a couple improvements I would like help with:
1. The a+x
(execute) permission should only apply to directories, and should not be inherited for files automatically.
2. The o+r
(read) permission should only apply to files, and *not* directories, because I want to disable ls
ability for the anonymous users.
*I'm very pleased with OmniOS/Illumos & ZFS, but unfortunately it uses the Solaris ACL scheme which is quite different from the more commonly found Linux ACL syntax.*
Some kind of conditional inheritance is in order, inheriting one way for files, and the other way for directories. Is this possible?
700 Software
(487 rep)
Nov 30, 2016, 05:29 PM
• Last activity: Dec 1, 2016, 10:21 AM
Showing page 1 of 15 total questions