Re: can root somehow create a immutable file in a non-uid-0 hierarchy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Skunk Worx wrote:
> fc6 user...basic fs question.
> 
> Suppose I am root/UID 0. Is there a way to create a file in someone
> else's (non-uid-0) FS hierarchy and have it be immutable? No rename, etc.?
> 
> I'm trying to do a hot-plug of disk keys and I would like to put some of
> my own bytes somewhere so I know whether or not I've seen the disk key
> before.
> 
> Some years ago I used SGI machines and they had a file system with a
> volume header I could use. I don't think extX has such a capability.
> 
> I'm pretty sure the answer is no, but I figured I'd ask anyway.
> 
> Thanks,
> John
> 
Another approach might be to use e2label. One thing to be aware of
is that HAL will use that label as the mount point when
auto-mounting. For example, a partition labeled Pictures will get
mounted on /media/Pictures unless you have ether fstab or HAL rules
specifying a different mount point.

One other thing - you can test the device serial number in udev.
Getting it after udev is done is harder - hdparm will return it for
read drives, and you can get it from /proc/bus/usb/devices for USB
devices. (You should be able to get it from the /sys file system as
well, but don't ask me how...)

Mikkel
-- 

  Do not meddle in the affairs of dragons,
for thou art crunchy and taste good with Ketchup!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux