S
S
syxoi2016-12-30 15:27:22
linux
syxoi, 2016-12-30 15:27:22

How to create/mount filesystem with 777 permissions by default?

Arch.
According to this instruction , I made zrams via udev
Coaxially, I want to put ~/.cache and /tmp on zram
KERNEL=="zram0", ATTR{disksize}="512M" RUN="/usr/bin/mkfs.ext4 /dev /zram0", TAG+="systemd"
fstab: /dev/zram0 /home/user/.cache defaults 0 0
But permission problem...
If you could just set permissions to 777, but that's not enough, because rights are lost every time you start (which is logical for a ramdisk).
PYSY: I'm looking for a really crutchless way, writing a unit is already a crutch.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
syxoi, 2016-12-30
@syxoi

In general, I solved the problem in a slightly different way: I
wrote a unit and added this to it:
Conflicts=umount.target
Before=local-fs.target umount.target
This will allow it to boot "before" how the system will mount all the FS.
And, coaxially, we are already prescribing mkfs, mount and chmod in the script.
-------------------------------------------------- -------------------------------------------------- ----------
ACL doesn't help either.
$ getfacl temp
# file: temp/
# owner: user
# group: user
user::rwx
group::rwx
other::rx
default:user::rwx
default:group::rwx
default:other::rwx
immediately after mounting, root takes away all rights..
$ getfacl temp
# file: temp/
# owner: root
# group: root
user::rwx
group::rx
other::rx

D
Dmitry, 2016-12-30
@plin2s

Try adding umask=000 to the mount options in fstab after defaults. You
should get something like "defaults,umask=000 0 0"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question