View previous topic :: View next topic |
Author |
Message |
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Tue Apr 22, 2014 1:25 pm Post subject: xattr in tmpfs |
|
|
I am trying to get netflix working through pipelight, and part of what I need is xattr support. I have three mount points: / /home and /tmp which are ext4, ext4 and tmpfs respectively. When I run this: Code: | touch xattr_test && setfattr -n 'user.testAttr' -v 'attribute value' xattr_test &> /dev/null; getfattr xattr_test 2>&1 | grep -q user.testAttr && echo 'It works!' || echo 'No workie!'; rm xattr_test &> /dev/null | in / and /home I get "It works!" when I run it in /tmp I get "No workie!"
/etc/fstab: Code: | LABEL=BOOT /boot ext4 noauto,noatime,discard 1 2
LABEL=ROOT / ext4 noatime,defaults,discard,user_xattr 0 1
LABEL=HOME /home ext4 noatime,defaults,discard,user_xattr 0 2
#LABEL=VAR /var reiserfs noatime,defaults 0 2
LABEL=STUFF /mnt/stuff auto noatime,defaults 0 0
#LABEL=SWAP none swap sw 0 0
tmpfs /var/tmp/portage tmpfs defaults,size=3g 0 0
tmpfs /tmp tmpfs defaults,size=100m,nosuid,noexec,mode=1777 0 0
tmpfs /var/log tmpfs defaults,size=100m,nosuid,noexec,mode=1777 0 0
|
I tried adding user_xattr to the options for the tmpfs mount but I get: Code: | # mount -o remount /tmp
mount: /tmp not mounted or bad option
In some cases useful info is found in syslog - try
dmesg | tail or so
# dmesg | tail -n1
[81045.900448] tmpfs: No value for mount option 'user_xattr'
# zcat /proc/config.gz | grep TMPFS
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y |
How do I fix this? |
|
Back to top |
|
|
ryao Retired Dev
Joined: 27 Feb 2012 Posts: 132
|
|
Back to top |
|
|
Nicias Guru
Joined: 06 Dec 2005 Posts: 446
|
Posted: Wed Apr 23, 2014 4:22 pm Post subject: |
|
|
Actually it seems to work without xattr on /tmp. Go figure. |
|
Back to top |
|
|
Kalin Tux's lil' helper
Joined: 22 Dec 2002 Posts: 130 Location: Germany
|
Posted: Fri Apr 29, 2016 3:02 am Post subject: |
|
|
I just hit the same problem I guess... or more specifically https://archives.gentoo.org/gentoo-user/message/66698c18232c8df16f975e64705375b3
I checked, my kernel config, all is fine: Code: | $ zcat /proc/config.gz |fgrep CONFIG_TMPFS
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
|
But trying to set a xattr in /tmp does not work. Fiddled with a few mount options, no go.
Any idea why it worked for you?
Anything in /etc/filesystems for tmpfs? |
|
Back to top |
|
|
Marcih Apprentice
Joined: 19 Feb 2018 Posts: 213
|
Posted: Thu Oct 17, 2019 1:23 pm Post subject: |
|
|
Kalin wrote: | I just hit the same problem I guess... or more specifically https://archives.gentoo.org/gentoo-user/message/66698c18232c8df16f975e64705375b3
I checked, my kernel config, all is fine: Code: | $ zcat /proc/config.gz |fgrep CONFIG_TMPFS
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
|
But trying to set a xattr in /tmp does not work. Fiddled with a few mount options, no go.
Any idea why it worked for you?
Anything in /etc/filesystems for tmpfs? |
Necrobumping, same issue. I have PORTAGE_TMPDIR on tmpfs, same kernel options enabled. Code: | tmpfs: No value for mount option 'user_xattr' |
_________________
Bones McCracker wrote: | It wouldn't be so bad, if it didn't suck. |
NeddySeagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
|
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Thu Oct 17, 2019 1:53 pm Post subject: |
|
|
Marcih wrote: | Code: | tmpfs: No value for mount option 'user_xattr' |
|
Look at 'man tmpfs':
Quote: | The tmpfs filesystem supports extended attributes (see xattr(7)), but user extended attributes are not permitted. |
|
|
Back to top |
|
|
Marcih Apprentice
Joined: 19 Feb 2018 Posts: 213
|
Posted: Thu Oct 17, 2019 4:18 pm Post subject: |
|
|
mike155 wrote: | Marcih wrote: | Code: | tmpfs: No value for mount option 'user_xattr' |
|
Look at 'man tmpfs':
Quote: | The tmpfs filesystem supports extended attributes (see xattr(7)), but user extended attributes are not permitted. |
|
Right, I didn't look there, thanks for the pointer. Does this mean I have to have FEATURES="-xattr" when compiling in tmpfs? _________________
Bones McCracker wrote: | It wouldn't be so bad, if it didn't suck. |
NeddySeagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21607
|
Posted: Fri Oct 18, 2019 1:06 am Post subject: |
|
|
I have FEATURES=xattr enabled and compile in a tmpfs without issue. I don't recall doing anything special to make it work, and user_xattr is not mentioned in my fstab or in /proc/self/mountinfo. |
|
Back to top |
|
|
Marcih Apprentice
Joined: 19 Feb 2018 Posts: 213
|
Posted: Thu Mar 19, 2020 12:52 pm Post subject: |
|
|
Hu wrote: | I have FEATURES=xattr enabled and compile in a tmpfs without issue. I don't recall doing anything special to make it work, and user_xattr is not mentioned in my fstab or in /proc/self/mountinfo. |
How do you have the your tmpfs where you compile mounted, what mounts options do you have set? I followed the guide on the wiki: Code: | tmpfs /tmp tmpfs size=80%,noatime,nodev,mode=1777 0 0
tmpfs /tmp/portage tmpfs size=80%,noatime,nodev,uid=portage,gid=portage,mode=775,x-mount.mkdir=775 0 0 |
_________________
Bones McCracker wrote: | It wouldn't be so bad, if it didn't suck. |
NeddySeagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
|
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21607
|
Posted: Fri Mar 20, 2020 2:38 am Post subject: |
|
|
Code: | tmpfs /var/tmp/portage tmpfs nodev,uid=250,gid=250,mode=755 0 0 |
|
|
Back to top |
|
|
Marcih Apprentice
Joined: 19 Feb 2018 Posts: 213
|
Posted: Fri Mar 20, 2020 9:03 am Post subject: |
|
|
Hmm, so essentially the same as mine... I checked my running kernel config too, just to be sure: Code: | $ zcat /proc/config.gz | grep -i tmpfs
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y |
I've re-enabled FEATURES="xattr" in Portage, I'll see if I run into trouble again. Thanks for sharing the info Hu. _________________
Bones McCracker wrote: | It wouldn't be so bad, if it didn't suck. |
NeddySeagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
|
|
Back to top |
|
|
Marcih Apprentice
Joined: 19 Feb 2018 Posts: 213
|
Posted: Fri Mar 20, 2020 2:00 pm Post subject: |
|
|
Nope, sys-libs/libcap: Code: | >>> Completed installing sys-libs/libcap-2.26-r2 into /tmp/portage/sys-libs/libcap-2.26-r2/image/
* Final size of build directory: 2756 KiB (2.6 MiB)
* Final size of installed tree: 540 KiB
making executable: /lib64/libcap.so.2.26
making executable: /usr/lib/libcap.so.2.26
strip: x86_64-pc-linux-gnu-strip --strip-unneeded -N __gentoo_check_ldflags__ -R .comment -R .GCC.command.line -R .note.gnu.gold-version
/sbin/getpcaps
/sbin/capsh
/sbin/getcap
/sbin/setcap
/lib/security/pam_cap.so
/usr/lib/libcap.so.2.26
/lib64/libcap.so.2.26
/lib64/security/pam_cap.so
!!! Failed to copy extended attributes. In order to avoid this error,
!!! set FEATURES="-xattr" in make.conf.
!!! copy /tmp/portage/sys-libs/libcap-2.26-r2/image/sbin/setcap -> /sbin/setcap failed.
!!! Filesystem containing file '/sbin/setcap#new' does not support extended attribute 'security.capability' |
Does this mean the problem is where Portage is trying to copy the compiled files, i.e. the fs where /sbin/ is? My / fs is ext4: Code: | $ zcat /proc/config.gz | grep -i ext4
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_EXT4_FS_POSIX_ACL=y
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_ENCRYPTION is not set
# CONFIG_EXT4_DEBUG is not set | Sound like CONFIG_EXT4_FS_SECURITY should be enabled... EDIT: The answer was yes. _________________
Bones McCracker wrote: | It wouldn't be so bad, if it didn't suck. |
NeddySeagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
|
|
Back to top |
|
|
|