|
View:
New views
11 Messages
—
Rating Filter:
Alert me
|
|
|
Cannot set xattrHi all,
I'm thinking of different ways to organize my files and xattrs seem a nice, standardized way to do so (don't ask me exactly what I'm trying to do, for I only have a slight idea). The problem is: I can't use them at all. I'm using the default kernel, which, according to /proc/config.gz has: CONFIG_EXT4_FS_XATTR=y and I'm using ext4, evidently. I've tried doing the following: $ echo 'asd' > test $ attr -s user.author -V andre test attr_set: Operation not supported Could not set "user.author" for test but, as you can see, it doesn't work. Running it as root doesn't work, too. I've also made a small C program, but it also fails to set the xattr, returning ENOTSUP (operation not supported), so it isn't a problem with 'attr'. I do have 'attr' from [core] installed so I don't know what else can be the problem. Thanks in advance, Andre |
|
|
Re: Cannot set xattrOn Sun, Nov 8, 2009 at 7:25 PM, André Ramaciotti da Silva
<andre.ramaciotti@...> wrote: > Hi all, > > I'm thinking of different ways to organize my files and xattrs seem a > nice, standardized way to do so (don't ask me exactly what I'm trying to > do, for I only have a slight idea). > > The problem is: I can't use them at all. I'm using the default kernel, > which, according to /proc/config.gz has: > > CONFIG_EXT4_FS_XATTR=y > > and I'm using ext4, evidently. > > I've tried doing the following: > > $ echo 'asd' > test > $ attr -s user.author -V andre test > attr_set: Operation not supported > Could not set "user.author" for test > > but, as you can see, it doesn't work. Running it as root doesn't work, > too. I've also made a small C program, but it also fails to set the xattr, > returning ENOTSUP (operation not supported), so it isn't a problem with > 'attr'. > > I do have 'attr' from [core] installed so I don't know what else can be > the problem. > > Thanks in advance, > Andre > man mount user_xattr / nouser_xattr Support "user." extended attributes (or not). sudo mount / -o remount,user_xattr or put it directly in fstab |
|
|
Re: Cannot set xattrAndré Ramaciotti da Silva schrieb:
> The problem is: I can't use them at all. I'm using the default kernel, > which, according to /proc/config.gz has: > > CONFIG_EXT4_FS_XATTR=y > > and I'm using ext4, evidently. > > I've tried doing the following: > > $ echo 'asd' > test > $ attr -s user.author -V andre test > attr_set: Operation not supported > Could not set "user.author" for test > > but, as you can see, it doesn't work. Running it as root doesn't work, > too. I've also made a small C program, but it also fails to set the xattr, > returning ENOTSUP (operation not supported), so it isn't a problem with > 'attr'. ext2/3/4, you have to mount with the user_xattr mount options. Simply add it to fstab. |
|
|
Re: Cannot set xattrThank you Thomas and Xavier.
I just got a little worried though. Is there any reason for user_xattr not being enabled by default? |
|
|
Re: Cannot set xattrOn Sun, Nov 8, 2009 at 9:14 PM, André Ramaciotti da Silva <
andre.ramaciotti@...> wrote: > Thank you Thomas and Xavier. > > I just got a little worried though. Is there any reason for user_xattr not > being enabled by default? > I think it's because Arch doesn't use SELinux by default, as it's mostly for ACLs. Priit |
|
|
Re: Cannot set xattrAndré Ramaciotti da Silva schrieb:
> Thank you Thomas and Xavier. > > I just got a little worried though. Is there any reason for user_xattr not > being enabled by default? > Not sure, you may ask the ext2/3/4 developers. I usually enable it on /home, but not on other partitions. IIRC, SuSE enables it by default in fstab. Arch just uses "defaults" for the options, so there is no user_xattr. |
|
|
Re: Cannot set xattrOn Sun, Nov 08, 2009 at 09:23:11PM +0200, Priit Kivisoo wrote:
> On Sun, Nov 8, 2009 at 9:14 PM, André Ramaciotti da Silva < > andre.ramaciotti@...> wrote: > > > Thank you Thomas and Xavier. > > > > I just got a little worried though. Is there any reason for user_xattr not > > being enabled by default? > > > > I think it's because Arch doesn't use SELinux by default, as it's mostly for > ACLs. > > Priit I'm sorry, I think I wasn't very clear in my question. It isn't the default in Arch Linux because it isn't the default upstream, but why it isn't the default upstream? My worry is that it's somehow related to dataloss, but I couldn't find any search result about it, so I'll assume it's secure. In the worst case, I have my (daily) backups :) Thank you all. |
|
|
Re: Cannot set xattrPriit Kivisoo schrieb:
>> I just got a little worried though. Is there any reason for user_xattr not >> being enabled by default? >> > > I think it's because Arch doesn't use SELinux by default, as it's mostly for > ACLs. Neither selinux nor ACL have anything to do with this options. Read man 5 attr. |
|
|
Re: Cannot set xattrAndré Ramaciotti da Silva schrieb:
> I'm sorry, I think I wasn't very clear in my question. It isn't the > default in Arch Linux because it isn't the default upstream, Probably because we just set "defaults" in fstab and let the user worry about the rest. > but why it > isn't the default upstream? > > My worry is that it's somehow related to dataloss, but I couldn't find any > search result about it, so I'll assume it's secure. In the worst case, I > have my (daily) backups :) It is safe, these attributes just take some space. No idea why they don't want these enabled by default. There are some applications that need those attributes, I think beagle does, not sure. In any case, if you use your own user.* xattr scheme, you should prefix them by something to make sure the names are unique. |
|
|
Re: Cannot set xattrOn Sun, Nov 8, 2009 at 9:32 PM, Thomas Bächler <thomas@...> wrote:
> Priit Kivisoo schrieb: > > I just got a little worried though. Is there any reason for user_xattr not >>> being enabled by default? >>> >>> >> I think it's because Arch doesn't use SELinux by default, as it's mostly >> for >> ACLs. >> > > Neither selinux nor ACL have anything to do with this options. Read man 5 > attr. > > for example, additional security features such as Access Control Lists (ACLs) may be implemented using extended attributes." That's what I read. I may be wrong, of course. Priit |
|
|
Re: Cannot set xattrPriit Kivisoo schrieb:
>> Neither selinux nor ACL have anything to do with this options. Read man 5 >> attr. >> >> > "They are often used to provide additional functionality to a filesystem - > for example, additional security features such as Access Control Lists > (ACLs) may be implemented using extended attributes." > That's what I read. I may be wrong, of course. There are 4 different types of extended attributes, that is also details in man 5 attr. |
| Free embeddable forum powered by Nabble | Forum Help |