Hello, I have a problem setting up some permissions to file and editing this file with vi.. I have two different examples to show you what I mean... First one:
[EMAIL PROTECTED] ~]$ echo "some text" > some_file.txt [EMAIL PROTECTED] ~]$ chmod 000 some_file.txt [EMAIL PROTECTED] ~]$ ls -l some_file.txt ---------- 1 netlest staff 10 2 gru 09:55 some_file.txt [EMAIL PROTECTED] ~]$ echo "some other text" >> some_file.txt -bash: some_file.txt: Permission denied [EMAIL PROTECTED] ~]$ cat some_file.txt cat: some_file.txt: Permission denied [EMAIL PROTECTED] ~]$ chmod 600 some_file.txt [EMAIL PROTECTED] ~]$ cat some_file.txt some text [EMAIL PROTECTED] ~]$ Everythink was ok... And now.. another one [EMAIL PROTECTED] ~]$ echo "some text" > some_file.txt [EMAIL PROTECTED] ~]$ chmod 000 some_file.txt [EMAIL PROTECTED] ~]$ ls -l some_file.txt ---------- 1 netlest staff 10 2 gru 09:55 some_file.txt [EMAIL PROTECTED] ~]$ vi some_file.txt Now ignore warnings with permission denied showing in vim.. and put some text into the some_file.txt and then :wq! [EMAIL PROTECTED] ~]$ ls -l some_file.txt ---------- 1 netlest staff 33 2 gru 10:23 some_file.txt [EMAIL PROTECTED] ~/t]$ cat some_file.txt cat: some_file.txt: Permission denied [EMAIL PROTECTED] ~/t]$ chmod 600 some_file.txt [EMAIL PROTECTED] ~/t]$ cat some_file.txt aasda sd a some texs asdas d as [EMAIL PROTECTED] ~/t]$ Why I am able to put some text into some_file.txt with chmod 000 using vi editor and why i can not do the same using echo??? _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"