LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 01-18-2006, 09:38 AM   #1
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,270

Rep: Reputation: 119Reputation: 119
suid on directory - doesn't, sgid ok?


Strange problem this...
Fiddling with permissions, want to set user and group in a directory by sticky bits. Setting group works - but not user?

It should be like this (taking from samba.doc):
Code:
$ chmod 6775 /foodbar
$ ls -al /foodbar/..
You should see:
drwsrwsr-x  2 jack  engr    48 2003-02-04 09:55 foodbar
Now type:
$ su - jill
$ cd /foodbar
$ touch Afile
$ ls -al
You should see that the file Afile created by Jill will have ownership and permissions of Jack, as follows:
-rw-r--r--  1 jack  engr     0 2003-02-04 09:57 Afile
So I did the same:
ls -l /shares/
drwsrwsrwx 2 saras larare 4096 18 jan 16.16 saras
As user pingu:
# cd /shares/saras
# touch afile
# ls -l
-rw-rw-r-- 1 pingu larare 0 18 jan 16.20 Afile

Why the he... isn't user saras???

Oh, I forgot: I'm running Fedora Core4

Last edited by pingu; 01-18-2006 at 09:41 AM.
 
Old 01-18-2006, 04:04 PM   #2
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 51
I would've thought it should've worked too, but it doesnt:
info chmod:

Quote:
set the process's effective user ID to that of the file upon
execution (called the "setuid bit"). No effect on directories.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Eliminating SUID & SGID? ridertech Linux - Security 4 07-08-2004 05:58 PM
suid/sgid question plan9 Linux - Security 1 07-08-2004 07:15 AM
Question: the concept of suid and sgid feetyouwell Linux - Software 4 02-03-2004 04:12 PM
shell variables &suid&sgid alaios Linux - General 6 05-23-2003 04:03 PM
SGID and SUID on Directories mikeyt_333 Linux - General 1 03-26-2002 02:41 PM


All times are GMT -5. The time now is 01:06 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration