<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=Big5" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Les Mikesell wrote:<br>
<blockquote cite="mid45C97D56.4030304@gmail.com" type="cite">Tim wrote:
  <br>
  <blockquote type="cite"><a class="moz-txt-link-abbreviated" href="mailto:edwardspl@ita.org.mo:">edwardspl@ita.org.mo:</a>
    <br>
    <blockquote type="cite">
      <blockquote type="cite">But when user "edward" login to the
server by the telnet service, then he can modify the dot file...
        <br>
      </blockquote>
    </blockquote>
    <br>
Sam Varshavchik:
    <br>
    <blockquote type="cite">1) No, he can't.  Not if the file is owned
by root, with no other permissions.
      <br>
    </blockquote>
    <br>
The user owns the directory, they can remove files and create new ones.
    <br>
You'd have to do more than change those file's ownership to root, and
    <br>
I'm still not sure whether that'd work in a user's homespace.
    <br>
  </blockquote>
  <br>
Make sure every user has a unique group (the default in fedora), then
  <br>
for each home directory:
  <br>
chown root directoryname
  <br>
chmod g+rwx directoryname
  <br>
chmod +t directoryname
  <br>
and
  <br>
chown root directoryname/dotfile_to_protect
  <br>
  <br>
Now the user can still create new files and delete his own because of
the group rwx on the directory.  No one else has access because his
group is unique.  He can't remove files he doesn't own because of the
sticky bit (+t) on the directory.  So, he can't modify or remove files
owned by root.  And he can't remove the sticky bit because his home
directory is owned by root.
  <br>
  <br>
</blockquote>
<font size="-1">Hello to you,<br>
<br>
1, The System is FC6.<br>
2, After run "adduser edward" and login with user "edward", then<br>
<br>
[edward@svr1 ~]$ ls -l -a<br>
total 36<br>
drwx------ 3 edward edward 4096 Feb  6 22:51 .<br>
drwxr-xr-x 5 root   root   4096 Feb  6 22:50 ..<br>
-rw------- 1 edward edward   67 Feb  7 12:47 .bash_history<br>
-rw-r--r-- 1 edward edward   24 Feb  6 22:50 .bash_logout<br>
-rw-r--r-- 1 edward edward  176 Feb  7 11:57 .bash_profile<br>
-rw-r--r-- 1 edward edward  124 Feb  6 22:50 .bashrc<br>
drwxr-xr-x 3 edward edward 4096 Feb  6 22:50 .kde<br>
-rw-r--r-- 1 edward edward  658 Feb  6 22:50 .zshrc<br>
[edward@svr1 ~]$<br>
<br>
3, Is it :<br>
</font>chown root /home/edward<br>
chmod g+rwx ( What number of g+rwx, eg : ?77 ) /home/edward
<br>
chmod +t ( What number of +t ) /home/edward
<br>
chown root /home/edward/ All_dot_filenames<br>
<font size="-1"><br>
</font>
</body>
</html>