LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 10-10-2007, 10:45 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Permissions on One Folder?


Guys - I have a /share folder that is located under / so the entire path is simply /share. This folder is a public open share via "Samba" and I was wondering how do I make any files that are placed in that folder by anyone owned by foo:foo? Right now when a user connects to my share and drops in files, its owned by nobody:nogroup and I would like to auto make myself the owner of any files in that directory.

Any thoughts? Here is the directory as it stands...

Code:
cwilliams@cwilliams:/share$ ls -la
total 236
drwxrwxrwx  7 cwilliams cwilliams  4096 2007-10-10 09:56 .
drwxr-xr-x 22 root      root       4096 2007-10-03 08:36 ..
-rw-rw-r--  1 cwilliams cwilliams 81911 2007-09-14 10:34 centos_logo.png
drwxrwxr-x  6 cwilliams cwilliams  4096 2007-10-03 09:24 openoffice2
-rw-rw-r--  1 cwilliams cwilliams 84687 2007-09-14 10:49 redhat.jpeg
-rwxr--r--  1 nobody    nogroup   18453 2007-10-03 14:04 ssh_session.txt
drwxr-xr-x  2 cwilliams cwilliams  4096 2007-10-04 12:40 mirrors
drwx------  2 cwilliams cwilliams  4096 2007-10-04 14:18 .Trash-cwilliams
drwxr-xr-x  2 cwilliams cwilliams  4096 2007-09-13 16:31 code
drwxr-xr-x  3 cwilliams cwilliams  4096 2007-09-14 14:09 source_code
 
Old 10-10-2007, 11:13 AM   #2
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
You can modify the guest account entry in the /etc/samba/smb.conf file
 
Old 10-10-2007, 11:23 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
So change this line as shown below?

Code:
# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
   passdb backend = tdbsam

   obey pam restrictions = yes

   guest account = cwilliams
   invalid users = root
 
Old 10-10-2007, 12:50 PM   #4
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 98
That's the way I understand it.

By default the guest account is set to nobody, so if the guest account is not in the file or commented out, then that will be the account that gets used, this is for security purposes.

If you want files to be created as foo:foo, then you would need a user foo with a primary group of foo and have the smb.conf file entry:
Code:
guest account = foo
I dont have samba configured at home so I can't test the theory, please let me know if this does or doesn't work as anticipated.
 
  


Reply



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
folder permissions sharathkv25 Linux - General 3 04-12-2007 12:39 PM
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 05:23 PM
folder Permissions issinho Linux - Security 3 07-10-2005 02:35 PM
folder permissions Godsmacker777 Linux - Newbie 4 12-02-2004 10:26 PM
Folder permissions fatboyjim Linux - Newbie 12 06-05-2002 02:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:35 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration