Evidence:
Here it is, mate:
Code:
mingdao@silas:~$ cat test > test.txt
cat: test: No such file or directory
mingdao@silas:~$ vi test
mingdao@silas:~$ cat test > test.txt
mingdao@silas:~$ su bruce
Password:
bruce@silas:/home/mingdao$ cat test.txt
Rob's example...
bruce@silas:/home/mingdao$ ls -lh
ls: .: Permission denied
bruce@silas:/home/mingdao$ exit
mingdao@silas:~$ ls -lh /home/bruce/
/bin/ls: /home/bruce/: Permission denied
mingdao@silas:~$
I stand corrected, as I didn't read your post well enough.
So if the other user
knows the filename he can read it.
But if not, it's a moot point, as you can't "ls" another user.
Some other interesting asides...
Firefox will not allow you to cd to another user's directory,
using the menu File > Open File... (or Ctrl+O).
Entered in the Firefox address bar:
file:///home/bruce/test.txt
returns this result:
Code:
Firefox can't find the file at /home/bruce/test.txt.
Firefox can't read even
known files.
Code:
mingdao@silas:~$ su bruce
Password:
bruce@silas:/home/mingdao$ cat test
Rob's example w/out ext...
bruce@silas:/home/mingdao$ rm test
rm: remove write-protected regular file `test'? yes
rm: cannot remove `test': Permission denied
bruce@silas:/home/mingdao$ vi test
Rob's example w/out ext...
~
~
~
Read test [READONLY], 1 lines, 27 chars 1,1 Command
I don't think it's a security issue, or problem, but how Slackware is designed. You can read other user's files if you know their names and path (more than just the filename), but you cannot change them; because they're created 644.
In response to your original question, I don't know as I've never done that. Just chmod it and try.
But wouldn't it be easier to chmod an individual file that you didn't want another user to read?
Or if it's
top-secret material you can encrypt it with "gpg -r <recipient> -e <file>" and only that recipient can read it ... provided you're good enough creating the passwd.
How many different people (not users) use that box?
If you're the only user, this question is as the Chinese say "er bai wu." If there are other people using the box, perhaps a little creativity would prevent even the necessity of chmod'ing?
Where I live, because of the work I do, we use GnuPG for anything that we don't want someone else to read. There are a myriad of files, however, than even you are welcome to read.
