Posted by Toby A Inkster on 12/05/07 12:27
The Natural Philosopher wrote:
> I tested this last night. I was easily able to change a file that I
> owned to somebody else.
>
> No non standard permssions required.
[tai@ophelia (pts/1) ~]$ cd /tmp/
[tai@ophelia (pts/1) /tmp]$ ls -ld .
drwxrwxrwt 38 root root 77824 2007-12-05 12:06 .
[tai@ophelia (pts/1) /tmp]$ touch chown-test
[tai@ophelia (pts/1) /tmp]$ ls -l chown-test
-rw-r--r-- 1 tai users 0 2007-12-05 12:11 chown-test
[tai@ophelia (pts/1) /tmp]$ chown root chown-test
chown: changing ownership of `chown-test': Operation not permitted
[tai@ophelia (pts/1) /tmp]$ chown sk chown-test
chown: changing ownership of `chown-test': Operation not permitted
[tai@ophelia (pts/1) /tmp]$ chown apache chown-test
chown: changing ownership of `chown-test': Operation not permitted
[tai@ophelia (pts/1) /tmp]$ chown nobody chown-test
chown: changing ownership of `chown-test': Operation not permitted
[tai@ophelia (pts/1) /tmp]$ ls -l chown-test
-rw-r--r-- 1 tai users 0 2007-12-05 12:11 chown-test
[tai@ophelia (pts/1) /tmp]$ uname -a
Linux ophelia.g5n.co.uk 2.6.17.14-mm-desktop-9mdvsmp #1 SMP PREEMPT Sat
Aug 11 13:17:52 EDT 2007 i686 Pentium III (Coppermine) GNU/Linux
regan:~ tai$ cd /tmp/
regan:/tmp tai$ ls -ld .
drwxrwxrwt 13 root wheel 442 Dec 5 12:14 .
regan:/tmp tai$ touch chown-test
regan:/tmp tai$ ls -l chown-test
-rw-r--r-- 1 tai wheel 0 Dec 5 12:14 chown-test
regan:/tmp tai$ chown root chown-test
chown: chown-test: Operation not permitted
regan:/tmp tai$ chown www chown-test
chown: chown-test: Operation not permitted
regan:/tmp tai$ ls -l chown-test
-rw-r--r-- 1 tai wheel 0 Dec 5 12:14 chown-test
regan:/tmp tai$ uname -a
Darwin regan.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10
18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
[tobyink@pr-shellA ~]$ cd /tmp
[tobyink@pr-shellA /tmp]$ ls -ld .
drwxrwxrwt 99 root root 12288 Dec 5 03:32 .
[tobyink@pr-shellA /tmp]$ touch chown-test
[tobyink@pr-shellA /tmp]$ ls -l chown-test
-rw-r--r-- 1 tobyink users 0 Dec 5 04:24 chown-test
[tobyink@pr-shellA /tmp]$ chown root chown-test
chown: changing ownership of `chown-test': Operation not permitted
[tobyink@pr-shellA /tmp]$ chown apache chown-test
chown: changing ownership of `chown-test': Operation not permitted
[tobyink@pr-shellA /tmp]$ ls -l chown-test
-rw-r--r-- 1 tobyink users 0 Dec 5 04:24 chown-test
[tobyink@pr-shellA /tmp]$ uname -a
Linux pr-shellA.sourceforge.net 2.6.9-42.0.10.ELsmp #1 SMP Tue Feb 27
10:11:19 EST 2007 i686 athlon i386 GNU/Linux
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 10 days, 19:10.]
Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/11/28/itunes-sharing/
Navigation:
[Reply to this message]
|