New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

file permissions

Got problems with your B2 or B3? Share and get helped!
Post Reply
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

file permissions

Post by billdbr »

Hello,

I use suse 11.1/KDE4.1.3 on my laptop (fuoco) and Bubba2 (zefod,192.168.10.1)

I mounted the homedir and the storage dir of the bubba2 (zefod) on /zefod on my laptop

Here the relevant lines in fstab:

//192.168.10.1/home/bill /zefod/bill cifs credentials=/home/bill/.creds,uid=bill,gid=users 0 0
//192.168.10.1/storage /zefod/debruijn cifs credentials=/home/bill/.creds,uid=bill,gid=users 0 0

bill@fuoco:/zefod> ls -la
total 8
drwxr-xr-x 6 bill users 4096 2009-01-18 11:20 .
drwxr-xr-x 23 root root 4096 2009-01-27 10:12 ..
drwxr-xr-x 6 bill users 0 2009-01-27 21:32 bill
drwxrwxrwx 9 bill users 0 2009-01-18 14:10 debruijn
drwxr-xr-x 5 mariejose users 0 2009-01-19 12:23 mariejose
drwxr-xr-x 4 ww users 0 2009-01-18 12:18 ww
bill@fuoco:/zefod>

bill@fuoco:/zefod/bill> ls -la
total 20
drwxr-xr-x 6 bill users 0 2009-01-27 21:32 .
drwxr-xr-x 6 bill users 4096 2009-01-18 11:20 ..
-rw------- 1 bill users 174 2009-01-26 16:13 .bash_history
-rw-r--r-- 1 bill users 220 2009-01-14 17:59 .bash_logout
-rw-r--r-- 1 bill users 414 2009-01-14 17:59 .bash_profile
-rw-r--r-- 1 bill users 2227 2009-01-14 17:59 .bashrc
drwxr-x--- 2 bill users 0 2009-01-26 16:12 downloads
drwx------ 12 bill users 0 2009-01-27 21:19 Mail
drwx------ 45 bill users 0 2009-01-27 21:31 private
drwx------ 2 bill users 0 2009-01-14 17:59 torrents


when


when in OpenOffice.org writer (3.0.0) I try to save a file as /zefod/bill/private/xyz.odt, I get


Error saving the document:xyz
Object not accessible
The object can not be accessed due to insufficient user rights

Then I save the file in /home/bill and after it has been save I copy it (with Dolphin) I get:

Could not change permissions for
/zefod/bill/private/xyz.odt

I click ok and the file is copied.

With konqueror(kde3) it's the same

When I use the cp command in a terminal the file is copied witout error message.
When I write a file with vi it is saved without error message

I think it has something to do with the user id:

bill@fuoco:~> id
uid=1000(bill) gid=100(users) groups=16(dialout),33(video),100(users)

bill@zefod:~$ id
uid=1001(bill) gid=100(users) groups=100(users)

What to do about it?

gr. Leo
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Post by billdbr »

Nobody?

It's a real problem for me!

Leo
JohanSalo
Posts: 23
Joined: 17 Apr 2007, 10:05

Post by JohanSalo »

there is two command that is usefule in this situation

"chmod" and "chown"

you can google on this commands to see more.
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

I had similar problems and ended up changing my user id to same on all computers. I edited /etc/passwd manually and used 'chown' to change ownership (later on I found 'usermod' that will change id and ownership on all files you own in your home folder and its sub folders).

/Johan
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Post by billdbr »

Didn't help.

I made a new user called test on the bubba.
then did id test: uid 1004 gid 100

then I made a user test on my laptop
here I did id test: uid 1004 gid 100

the problem remains the same!
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

Hi,

I'm far from an expert and when you add yet another user name it's kind of confusing.

When you say "the problem remains the same" what exactly does this mean? Are you still trying to access files in bills home folder, or are you logged in as "test" and trying the same thing , but in test's home folder?

Your fstab entries are similar to mine, so that's probably not the culprit. Unfortunately I can't remember why I ended up changing id, but I do remember it solved what ever problem it was I was having.

/Johan
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Post by billdbr »

I login as test and try to save a testfile made with open office in /zefod/test/private.

I get the same error:

Error saving the document:xyz
Object not accessible
The object can not be accessed due to insufficient user rights
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Post by billdbr »

Maybe It is more clear when i write it like this:



I login as test.

accessing the files in /zefod/test is not the problem. I can read read the files in /zefod/test ok

When i make a file xyz with OpenOffice and try to save it in /zefod/test /private I get the error:


Error saving the document:xyz
Object not accessible
The object can not be accessed due to insufficient user rights. the file is not saved

Then I save the file in /home/test and after it has been saved I copy it to /zefod/test/private(with Dolphin) I get:

Could not change permissions for
/zefod/test/private/xyz.odt

I click ok and the file is all teh same copied.

With konqueror(kde3) it's the same

When I use the cp command in a terminal the file is copied witout error message.
When I write a file with vi it is saved without error message

I'm now in doubt if it has something to do with the userid.

To test it I made the user test on the bubba and on the
laptop with both userid 1004.

leo
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Post by 6feet5 »

Could you show the output of

Code: Select all

ls -l /zefod/test
/Johan
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Post by billdbr »

test@fuoco:~> ls -l /zefod/test
total 0
drwx------ 2 test users 0 2009-01-31 22:28 private
drwx------ 2 test users 0 2009-01-31 22:10 torrents
test@fuoco:~> ls -l /zefod/test/private
total 0
-rwxrw-r-- 1 test users 0 2009-01-31 22:26 cccc.odt
test@fuoco:~>

the file cccc.odt was copied into /zefod/test/private
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Re: file permissions

Post by billdbr »

It's more than a year now and the problem is not solved. I use the bubba two as a mail server but as fileserver it is unusable for me.
I did a fresh install of opensuse 11.2 hoping it was maybe a suse issue, but no'
I wil try to descibe my problem:

Situation:

Opensuse 11.2 KDE 4.3.1 (problem was the same on earlier versions)


Bubbaserver: name zefod (Bubba 2)
laptop : name fuoco

Homedir bill on zefod via fstab mounted on /zefod/bill

line in fstab:

//192.168.10.1/home/bill /zefod/bill cifs credentials=/home/bill/.creds,_netdev 0 0



bill@zefod:~/private$ id bill
uid=1001(bill) gid=100(users) groups=100(users)
bill@zefod:~/private$


bill@fuoco:~> id bill
uid=1001(bill) gid=100(users) groups=100(users),17(audio),20(cdrom),16(dialout),6(disk),33(video),10(wheel)
bill@fuoco:~>

-------------------------------------------------------------------------------------------------

With kwrite I make a textfile and save it in home/Documents/ as zefodtest.txt
Here are the filepermissions:

bill@fuoco:~/Documents> ls -la zefodtest.txt
-rw-r--r-- 1 bill users 10 2009-11-15 12:21 zefodtest.txt
bill@fuoco:~/Documents>

So far So good
Now I save the file (save as zefodtest.txt) in /zefod/bill/private
Here are the filepermissions:

bill@fuoco:/zefod/bill/private> ls -la zefodtest.txt
-rwxrw-r-- 1 bill users 10 2009-11-15 12:38 zefodtest.txt
bill@fuoco:/zefod/bill/private>

Via ssh on zefod:

bill@zefod:~/private$ ls -la zefodtest.txt
-rwxrw-r-- 1 bill users 10 2009-11-15 12:38 zefodtest.txt
bill@zefod:~/private$

here does the x come from??
----------------------------------------------------------------------------------------------------

I have a file scifi.txt in /home/bill/Documents
file permissions:

bill@fuoco:~/Documents> ls -l scifi.txt
-rw-r----- 1 bill users 155 2009-03-03 21:50 scifi.txt
bill@fuoco:~/Documents>

I copy (via dolphin) scifi.txt to /zefod/bill/private:

I get a warning: Could not change permissions for
/zefod/bill/private/scifi.txt
but the file is copied al the same.

file permissions:

bill@fuoco:/zefod/bill/private> ls -l scifi.txt
-rwxrw-r-- 1 bill users 155 2009-11-15 14:52 scifi.txt
bill@fuoco:/zefod/bill/private>

bill@zefod:~/private$ ls -l scifi.txt
-rwxrw-r-- 1 bill users 155 2009-11-15 14:52 scifi.txt
bill@zefod:~/private$

I is like the bubba has filepermissions the laptop cannot change.

I noticed that when I use filemanager on zefod
(logged in as admin) and check /home/bill and chose change file permissions

owner read and write are checked but grayed out
user read and write are checked
other read and write are not checked

and I cannot change them:

Is ther anybody who can help me?

my smb.conf

bill@zefod:/etc/samba$ more smb.conf
[global]


workgroup = Dbr
server string = %h Miniserver
dns proxy = no

log file = /var/log/samba/log.all
max log size = 1000
syslog = 0

security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
guest account = nobody
invalid users = root
map to guest = Bad User

socket options = TCP_NODELAY
preferred master = yes
load printers = yes
printcap name = cups
printing = cups
show add printer wizard = no
disable spoolss = Yes

interfaces = eth1
bind interfaces only = yes

#======================= Share Definitions =======================

[home]
comment = Home Directories
path = /home
browseable = yes
writable = yes
create mask = 0764
directory mask = 0775
public = no
guest ok = no
hide dotfiles = yes
user = @users

[storage]
comment = Common storage
writable = yes
guest ok = yes
public = yes
force group = users
force create mode= 0777
force directory mode = 0777
path = /home/storage

[printers]
comment = Attached printers
path = /var/spool/samba
browseable = no
guest ok = yes
printable = yes
use client driver = yes
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: file permissions

Post by RandomUsername »

I haven't read the full thread but this looks similar to a problem I was having. Try adding

Code: Select all

nodfs
as an option in fstab. If that fails,

Code: Select all

nounix
might work.
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Re: file permissions

Post by billdbr »

the options nodfs and nounix made no differnce,

maybe i have to change something in the smb.conf.

Are ther samba guru's out there who can help me??

Leo
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: file permissions

Post by carl »

Try removing the "uid=" and "gid=" as they shouldn't be needed, also you could try using the "setuids" flag; If that doesn't solve it, try "file_mode=arg" and "dir_mode=arg". More information might be found in "man mount.cifs", but I hope above solves your issue.

/Carl
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
billdbr
Posts: 40
Joined: 09 Sep 2008, 07:29

Re: file permissions

Post by billdbr »

SOLVED!!


Hello Carl,

I posted in several forums and in the suse network forum ken_yap pointed me to


http://bugzilla.kernel.org/show_bug.cgi?id=12246


I put " host msdfs = no " in /etc/samba/smb.conf

and now all works as it should.

Question :

I'm running debian etch v 2.6

Should I upgrade to a newer version
has the latest version cifs without the fds bug
Can I upgrade without losing all my files, my mail my users etc.?

( I once did an upgrade and that gave me some problems, I did several postings here at the time)

thanks Leo
Post Reply