Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a few Samba shares, and we can not seem to delete folders that are in these shares, from a Windows machine....We get a "Cannot delete folder. Folder is not empty" error. Then I have to manually login to the Linux machine and delete them. Anyway to allow this from A windows machine?
Yes, we can. So if we are accessing a Linux share via Samba, and it has 10,000 files in it, there's no way to delete the whole folder at once from Windows?
If you can delete the folder contents then it should not be too painful to select all the files and then press delete.
Note that it will take some time but so would deleting a folder on a Win PC.
I'm guessing here but I would imagine that to delete the folder you would need permissions in its parent. If that's the case then you might want to think very seriously about the desirability of doing this.
If this is a show stopper you could log in remotely using putty. This will put you in a TTY and you can use rm -r. Again you will need to have suitable permissions to do this.
I don't have much experience with samba, just ssh. With that I can access with a terminal that responds to all the same commands as with a linux system, so rm -r works. I don't know if there's something similar through samba or not though.
Thanks. Yes, I can access a terminal via telnet or SSH and delte files that way, but it's not very efficient everytime the disk gets full, someone needs to call me to have ME delete their files.
Maybe you can tackle the problem in another way. From what you say these seem to be unimportant files, since you just up and delete them. Could you not prevent them from being written in the first place? Or write a start-up script to delete them.
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216
Rep:
Check your smb.conf to be sure that Samba creates new directories with the appropriate permissions. Samba obeys the Linux file permissions, so if the user could not delete the directory from a Linux shell, they can't from Samba either. Generally I will use the [force group = <name>] option under the file share to be sure all users with access to that Samba share access and create files using the same Linux group. Then just be sure that group owns the the files and has appropriate permissions.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.