LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 01-18-2009, 02:39 AM   #1
Elnegro8
Member
 
Registered: Jul 2006
Posts: 70

Rep: Reputation: 15
cant delete files from samba share from vista machine get permission error


hi i have samba server and im access to these shares with user guest no password require

this is my smb.conf :
[global] workgroup = WORKGROUP
server string = Elena Samba Server
hosts allow = 192.168.2. 127.0.0.1
security = share
load printers = no
debug level = 2
smb passwd file = /etc/samba/smbpasswd
encrypt passwords = yes
log file = /var/log/samba/log.%m
log level = 2
guest ok = yes
guest only = yes



[Backup2]

comment =Windows-Backup2 (tzahi)
writable = yes
public = yes
path =/Files2/Server/

[Backup]

comment = Windows-Backup (tzahi)
writable = yes
public = yes
path =/Files/Server/

when i copy files to back up share from my vista machine to the samba share

all is good but when i try to delete them from vista as well

i get windows error " you need permisson to do this actison "

not for all the files

any idea why ? i try to delete with the same user that copy these files under windows

exdample of the files on the samba server :

[root@Elena ~]# ls -lhtr /Files/Server/mp3/
total 464K
-rwxr--r-- 1 nobody nobody 8.0K Jan 5 2008 alternativi.m3u
-rwxr--r-- 1 nobody nobody 4.7K Jan 6 2008 bbbb.m3u
-rwxr--r-- 1 nobody nobody 16K Jan 25 2008 1.m3u
-rwxr--r-- 1 nobody nobody 8.5K Aug 28 09:51 Thumbs.db
-rwxr--r-- 1 nobody nobody 78 Aug 28 09:51 Desktop.ini
drwxr-xr-x 6 nobody nobody 4.0K Jan 17 12:35 2Pac
drwxr-xr-x 4 nobody nobody 4.0K Jan 17 12:36 Air
drwxr-xr-x 2 nobody nobody 4.0K Jan 17 12:36 Alanis Morissette - The Collection
drwxr-xr-x 4 nobody nobody 4.0K Jan 17 12:36 Alice Cooper
drwxr-xr-x 4 nobody nobody 4.0K Jan 17 12:37 Alice in chains
drwxr-xr-x 2 nobody nobody 4.0K Jan 17 12:37 Asaf Avidan & The Mojos-The Reckoning
drwxr-xr-x 5 nobody nobody 4.0K Jan 17 12:37 beastie boys
drwxr-xr-x 5 nobody nobody 4.0K Jan 17 12:38 Bj�Īrk
drwxr-xr-x 6 nobody nobody 4.0K Jan 17 12:39 Bob Dylan
drwxr-xr-x 32 nobody nobody 4.0K Jan 17 12:42 bob marley
 
Old 01-26-2009, 07:08 AM   #2
chitambira
Member
 
Registered: Oct 2008
Location: Fife
Distribution: RHEL, Centos
Posts: 373
Blog Entries: 1

Rep: Reputation: 49
OS permissions are overiding your samba permissions here. In this case the files that you copied are owned by someone else in windows. Check the owner, or change the NTFS attributes of the files.

----------------
Benny Chitambira
 
Old 01-26-2009, 08:10 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
The nobody user is the linux equivalent to the "guest" user in windows.

Could you list the permissions of the directory being shared?
ls -ld /Files/Server/mp3/

The user nobody needs write permission on the directory itself to be able to delete files. Deleting a file edits the directory (a file to the kernel) and not to the file itself.

If you were to use the default "user" level security model, you would create your shared directory with rwxt permissions. The "t" (sticky) bit prevents one user from deleted another users files. I wonder if using "share" level security, and "guest" only causes the permissions to deny deleting. In this case, since you have only one user, you may not want to have the sticky bit set. You may want "rwx" permissions for user, group and other, but no stick bit. I don't have a share level security mode share on my desktop, so I can't test it from my laptop. ( Plus I only boot it up into Vista about once a month for updates)

For a globally writeable share, I would use the default "user" level security model, and the global option:
map to guest = bad user

I would create the share with the option:
allow guest = yes (same as public = yes)

This would retain ownership for authenticated users. For non-authenticated users (e.g. bad user from the global option) the username and group name would be "nobody". Setting the permissions of the directory being shared with "sudo chmod a=rwxt" would use the same permissions as the /tmp directory. The sticky bit prevents one user from deleting another users files. It is up to the user whether they want to change the "rw" permissions of the file depending on whether they want anyone else to be able to read or edit the file.
 
Old 02-20-2009, 07:17 AM   #4
Elnegro8
Member
 
Registered: Jul 2006
Posts: 70

Original Poster
Rep: Reputation: 15
10xx alot i will try to see if its worknig
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't connect to samba share from Vista, can from XP darthfoolish Linux - Networking 2 12-13-2008 05:20 AM
how to make Vista access samba share bfzhou Linux - Newbie 3 11-26-2008 01:32 PM
How to share files between my linux virtual machine and window vista host? huy_china Linux - Newbie 8 10-07-2008 04:42 PM
Samba Share problem with Windows Vista Rustylinux Mandriva 0 08-24-2007 03:27 PM
Samba - dont have permission to browse samba share. Scrag Linux - Software 4 11-28-2006 01:42 AM


All times are GMT -5. The time now is 04:27 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