Re: [arch-general] Cannot set xattr

2009-11-08 Thread Thomas Bächler

Priit 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.




signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Cannot set xattr

2009-11-08 Thread Priit Kivisoo
On Sun, Nov 8, 2009 at 9:32 PM, Thomas Bächler  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.
>
>
"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.

Priit


Re: [arch-general] Cannot set xattr

2009-11-08 Thread Thomas Bächler

André 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.




signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Cannot set xattr

2009-11-08 Thread Thomas Bächler

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.




signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Cannot set xattr

2009-11-08 Thread André Ramaciotti da Silva
On 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.ramacio...@gmail.com> 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: [arch-general] Cannot set xattr

2009-11-08 Thread Thomas Bächler

André 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.




signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Cannot set xattr

2009-11-08 Thread Priit Kivisoo
On Sun, Nov 8, 2009 at 9:14 PM, André Ramaciotti da Silva <
andre.ramacio...@gmail.com> 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: [arch-general] Cannot set xattr

2009-11-08 Thread André Ramaciotti da Silva
Thank you Thomas and Xavier.

I just got a little worried though. Is there any reason for user_xattr not
being enabled by default?


Re: [arch-general] Cannot set xattr

2009-11-08 Thread Thomas Bächler

André 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'.


That's because if you want to use user.* extended attributes on 
ext2/3/4, you have to mount with the user_xattr mount options. Simply 
add it to fstab.




signature.asc
Description: OpenPGP digital signature


Re: [arch-general] Cannot set xattr

2009-11-08 Thread Xavier
On Sun, Nov 8, 2009 at 7:25 PM, André Ramaciotti da Silva
 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


[arch-general] Cannot set xattr

2009-11-08 Thread André Ramaciotti da Silva
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