Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have files on a Samba server in the local company network and accessing them from a Windows Vista machine. Usually, if I want to delete a directory containing read-only files, Windows simply deletes the whole folder anyway. However, when I do this with a dir on the server, Windows just tells me that I need permissions (screenshot of an identical error message, just different file). The workaround is to remove the read-only flag from the directory and all contained files and then deleting. However, I have a TortoiseSVN versioned dir on the server, and the .svn dirs contain read-only files. I need to remove the read-only flags from the dir before every commit, or else it fails. This is quite distressing and shouldn't be so. Does someone know how to attack this problem? (If someone knows how to tell TortoiseSVN to not make its files read-only, that would probably be ok as well) ... Thanks!

EDIT:

The file in question is a shared file, i.e. I have no specific user account on the Samba server. Owner is nobody, and everyone has all rights to the file. If (in Windows) I set the file as "readonly", then (in Linux, Debian Lenny, where Samba is installed) everyone suddenly has absolutely no rights on the file anymore. If I remove the readonly flag, everyone has all rights again.

Here is the Samba config file smb.conf:

# Samba config file created using SWAT
# from 192.168.1.200 (192.168.1.200)
# Date: 2006/08/25 17:14:50

# Global parameters
[global]
        workgroup = FIRMA
        server string = %h server (Samba %v)
        security = SHARE
        obey pam restrictions = Yes
        passdb backend = ****
        passwd program = ****
        passwd chat = ****
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        panic action = /usr/share/samba/panic-action %d
        include = /etc/samba/dhcp.conf

[homes]
        comment = Home Directories
        create mask = 0700
        directory mask = 0700
        browseable = No

[shared]
        path = /baldur
        read only = No
        create mask = 0777
        directory mask = 0777
        guest only = Yes
        guest ok = Yes
        map archive = yes
        map system = yes
        map hidden = yes

EDIT 2:

baldur:/baldur/Mitarbeiter/Felix/Praktikum/projektrenate# ls -ld .svn
drwxrwxrwx 6 nobody nogroup 4096 15. Dez 19:34 .svn

baldur:/baldur/Mitarbeiter/Felix/Praktikum/projektrenate/.svn# ls -al
insgesamt 32
drwxrwxrwx 6 nobody nogroup 4096 15. Dez 19:34 .
drwxrwxrwx 5 nobody nogroup 4096 15. Dez 13:37 ..
-rwxrw-rw- 1 nobody nogroup   77 15. Dez 18:19 all-wcprops
-r-xr--r-- 1 nobody nogroup  236 15. Dez 18:19 entries
drwxrwxrwx 2 nobody nogroup 4096 15. Dez 12:56 prop-base
drwxrwxrwx 2 nobody nogroup 4096 15. Dez 12:56 props
drwxrwxrwx 2 nobody nogroup 4096 15. Dez 18:19 text-base
drwxrwxrwx 5 nobody nogroup 4096 15. Dez 18:19 tmp
baldur:/baldur/Mitarbeiter/Felix/Praktikum/projektrenate/.svn# less entries
baldur:/baldur/Mitarbeiter/Felix/Praktikum/projektrenate/.svn# ls -al
insgesamt 32
drwxrwxrwx 6 nobody nogroup 4096 15. Dez 19:34 .
drwxrwxrwx 5 nobody nogroup 4096 15. Dez 13:37 ..
-rwxrw-rw- 1 nobody nogroup   77 15. Dez 18:19 all-wcprops
-rwxrw-rw- 1 nobody nogroup  236 15. Dez 18:19 entries
drwxrwxrwx 2 nobody nogroup 4096 15. Dez 12:56 prop-base
drwxrwxrwx 2 nobody nogroup 4096 15. Dez 12:56 props
drwxrwxrwx 2 nobody nogroup 4096 15. Dez 18:19 text-base
drwxrwxrwx 5 nobody nogroup 4096 15. Dez 18:19 tmp
baldur:/baldur/Mitarbeiter/Felix/Praktikum/projektrenate/.svn#
share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You should export the project, not delete the .svn folders. See: http://svnbook.red-bean.com/en/1.0/re10.html

Edit: delete readonly = yes added to the share entry in samba configuration is fixing the problem of deleting folders that contain read only files. Thanks to @Felix Dombek

share|improve this answer
    
I don't delete the .svn folders. TortoiseSVN needs to access and modify files in them when it's doing commits/updates. But the Samba NAS won't let it unless I remove the read-only flag from them. –  Felix Dombek Dec 21 '10 at 15:39
    
can you please check the permissions on the .svn folder, the owner/group of the .svn folder and the user/groups that is used to mount the share? Or just print them here and replace/remove any confidential information. –  Mircea Vutcovici Dec 21 '10 at 15:45
    
Hey thanks for your help! I updated the question! –  Felix Dombek Dec 21 '10 at 18:13
    
I think it is a problem with the create mask. Can you please tell me on which share you have the problem and give the output of ls -ld .svn? –  Mircea Vutcovici Dec 21 '10 at 18:54
1  
Cool! I added map readonly = no and delete readonly = yes (which is probably unneeded when unmapped, but anyway) and it seems to work fine now! Thanks a lot. –  Felix Dombek Dec 23 '10 at 13:16
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.