LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-22-2005, 11:38 AM   #1
Tenover
Member
 
Registered: Mar 2003
Posts: 123

Rep: Reputation: 15
Can't delete folders from Windows


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?
 
Old 12-22-2005, 01:05 PM   #2
mcmillan
Member
 
Registered: Jul 2005
Distribution: Arch
Posts: 489

Rep: Reputation: 30
Not being able to delete a folder with stuff in it is normal when working with linux. Are you able to delete the contents of the folders from windows?
 
Old 12-22-2005, 02:48 PM   #3
Tenover
Member
 
Registered: Mar 2003
Posts: 123

Original Poster
Rep: Reputation: 15
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?
 
Old 12-22-2005, 03:49 PM   #4
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 863

Rep: Reputation: 45
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.
 
Old 12-22-2005, 03:50 PM   #5
mcmillan
Member
 
Registered: Jul 2005
Distribution: Arch
Posts: 489

Rep: Reputation: 30
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.
 
Old 12-23-2005, 10:49 AM   #6
Tenover
Member
 
Registered: Mar 2003
Posts: 123

Original Poster
Rep: Reputation: 15
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.
 
Old 12-23-2005, 11:36 AM   #7
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 863

Rep: Reputation: 45
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.

On windows machines I used to include:

Code:
del c:\temp\*.* /s
in autoexec.bat
 
Old 12-23-2005, 11:41 AM   #8
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-Networking and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-23-2005, 11:55 PM   #9
centauricw
Member
 
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
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.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't delete Folders. duffmckagan SUSE / openSUSE 1 09-19-2005 11:09 AM
HELP: can't delete files/folders :( kevingpo General 1 12-07-2004 07:51 PM
Delete old files and folders Script? AsteX Linux - General 4 11-11-2004 06:26 PM
Can you delete folders after ./configure ? iLLuSionZ Linux - Newbie 2 11-19-2003 07:39 PM
Am I able to delete folders after install? SuSE_Surfer Linux - General 6 10-17-2003 11:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration