Le 28.02.00 a 11:54, "Bernhard Rosenkraenzer" m'ecrivait :
)On Mon, 28 Feb 2000, Tressens Lionel wrote:
)
)> Sorry, I made a mistake. A user can change the mode of a file, even if it
)> doesn't belong to him. (with the command chmod).
)
)What permissions does the file currently have? I can't reproduce it here
)right out of the box:
)
)ftp> cd /etc
)250 CWD command successful.
)ftp> ls shadow
)200 PORT command successful.
)150 Opening ASCII mode data connection for /bin/ls.
)-r-------- 1 root root 790 Feb 17 21:40 shadow
)226 Transfer complete.
)ftp> chmod 0777 shadow
)550 shadow: Operation not permitted.
)
)LLaP
)bero
You're right on this example.
Look at this trace (I am user tressens. jarcas is another user) :
ftp> cd ../jarcas
250 CWD command successful.
ftp> ls tp5.c
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw-r--r-- 1 jarcas gii 1187 Jan 20 09:59 tp5.c
226 Transfer complete.
ftp> chmod 0666 tp5.c
200 CHMOD command successful.
ftp> ls tp5.c
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw-rw-rw- 1 jarcas gii 1187 Jan 20 09:59 tp5.c
226 Transfer complete.
I am from group "gii" too. So I tried on files of another group :
ftp> cd /home/gcu/4a/naussena
250 CWD command successful.
ftp> ls tour.doc
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw-r--r-- 1 naussena gcu 1234432 Jan 6 1999 tour.doc
226 Transfer complete.
ftp> chmod 600 tour.doc
200 CHMOD command successful.
ftp> ls tour.doc
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw------- 1 naussena gcu 1234432 Jan 6 1999 tour.doc
226 Transfer complete.
But, for /etc/shadow and all files owned by root, it doesn't seem
to work...
Lionel
------ Lionel TRESSENS ------
Computer Science Department.
INSA Toulouse - FRANCE
Tel. : +33 (0)6 63 76 15 13
-------------------------------
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.