• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1076
  • Last Modified:

File permission problem (Fedora 8/Samba)

RE: Fedora 8, Samba-3.0.26a-6

I have recently installed the latest Fedora Core 8 operating system but every time I attempt to lock files in the Shares I have created I am unable to write to any of the documents inside the directories. (Access denied. Contact your administrator)

Example command:

chmod -R ug+rwx,o-rwx,g+s,o+t 'TEST'

It seems to be an issue with: o+t

The following command works perfect in previous versions of Fedora/Samba??
0
the_omnific
Asked:
the_omnific
  • 7
  • 3
  • 2
1 Solution
 
http:// thevpn.guruCommented:
As what user are you trying to access the samba shares ?
0
 
the_omnificAuthor Commented:
The Linux machine is part of the domain, so basically every user on the network.

It works perfectly when I don't add 'o+t' part of the command. Any ideas?
0
 
http:// thevpn.guruCommented:
Well as you propably know +t sets the sticky bit and prevents removing or deleting. But I cant see why it would disallow write access.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
the_omnificAuthor Commented:
I know neither can I. I have always been able to set that restriction until I installed Fedora 8
0
 
the_omnificAuthor Commented:
-R option changes permissions for entire directory trees including documents. Is there any way of changing the permissions of directories only and excludes documents etc
0
 
the_omnificAuthor Commented:
..using the sticky bit?
0
 
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
the_omnific
-R option changes permissions for entire directory trees including documents. Is there any way of changing the permissions of directories only and excludes documents etc.

solution:

`find /sambashare/ -type d -exec chmod 777 {} \;`

find /sambashare/ <- tells that find should start searching from the directory sambashare and go recursivly thro all files and directories
-type d <- tells that you want 'find' to pay attention to every object of the type "directory"
-exec <- your about to ask find to execute a command in case it finds a match ( in our situation .. if it finds a directory )
chmod 777 {} <- sets the mode 777 onto the object found ( in our case.. the directory found )
\;  <- end

Try `find /sambashare/ -type d -exec echo {} \;` <- it will "echo" the name of every directory unser /sambashare/

hope this helps..

0
 
the_omnificAuthor Commented:
Your command doesn't seem to work:

`find /sambashare/ -type d -exec chmod 777 {} \;`

find: missing argument to `-exec'
0
 
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
I double checked it and it works on my system

petur@oxygen:~/tmp> mkdir foo
petur@oxygen:~/tmp> mkdir bar
petur@oxygen:~/tmp> ls -lh
total 16K
drwxr-xr-x 2 petur users 4.0K 2008-02-02 14:15 bar
drwxr-xr-x 2 petur users 4.0K 2008-02-02 14:15 foo
petur@oxygen:~/tmp> `find ~/tmp/ -type d -exec chmod 777 {} \;`
petur@oxygen:~/tmp> ls -lh
total 16K
drwxrwxrwx 2 petur users 4.0K 2008-02-02 14:15 bar
drwxrwxrwx 2 petur users 4.0K 2008-02-02 14:15 foo
petur@oxygen:~/tmp>
0
 
the_omnificAuthor Commented:
Sorry my mistake.

I'm still not able to write to documents when the sticky bit is enabled. Any ideas?
0
 
Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
Are you sure the sticky bit is enabled?
please show the output of `ls -lah`
0
 
the_omnificAuthor Commented:

[root@FILESERVER TEST]# ls -lah
total 24K
drwxr-s--T  5 administrator domain 4.0K 2008-02-01 15:03 .
drwxrwx--- 18 administrator domain 4.0K 2008-02-01 15:03 ..
drwxrws--T  2 administrator domain 4.0K 2008-02-02 15:09 1
drwxrws--T  2 administrator domain 4.0K 2008-02-02 14:42 2
drwxrws--T  2 administrator domain 4.0K 2008-02-01 15:04 3

As soon as I take the sticky bit off I can write to the documents in the directories perfectly fine.
#!/bin/bash
cd '/archive'
chown -R administrator:domain 'TEST'
chmod -R ug+rwx,o-rwx,g+s,o+t 'TEST'
chmod ug+rwx,g-w,o-rwx 'TEST'
`find TEST -type d -exec chmod o+t {} \;`

Open in new window

0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 7
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now