Who created the file ^- on user home directory
Avi Greenbury
lists at avi.co
Sun Feb 17 13:59:04 UTC 2013
neil al wrote:
> Any idea why is it everytime I boot. There is a file nameĀ ^- on my user home
> directory?
It doesn't sound like anything 'standard'; do you have any custom
start-up or login scripts that run? The timestamp of the file may give
some indication as to at what point during boot it started.
If you make the file immutable, it will cause whatever tries to write
that file to fail to, which may trigger an error (if it only writes
the file if it doesn't find it, this wont work). On an ext filesystem
(which is the default in Ubuntu) you can make a file immutable by
doing
sudo chattr +i <file name>
in a terminal. I've just tested with that filename and it seems to
work without any quote marks or escaping, which is nice. You'll be
able to test that this has worked with lsattr:
avi at amazing:~$ sudo chattr +i ^-
[sudo] password for avi:
avi at amazing:~$ lsattr ^-
----i--------e-- ^-
avi at amazing:~$
that 'i' means that the file is immutable. You can make it mutable
again by doing
sudo chattr -i <file name>
which removes that i:
avi at amazing:~$ sudo chattr -i ^-
avi at amazing:~$ lsattr ^-
-------------e-- ^-
avi at amazing:~$
and puts that back to how it was before. Setting the file immutable is
essentially to make it read-onl, but because you're doing it in the
filesytem it cannot be easily overriden by root. If a file is set such
that nobody may write to it, according to the posix permissions (i.e.
chmod 000 ./file) root may still write to it; with the filesystem
attributes root may only write to it if it first renders it mutable
again.
--
Avi
More information about the ubuntu-users
mailing list