LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 02-14-2006, 04:29 AM   #1
Sandor
LQ Newbie
 
Registered: Feb 2006
Posts: 2

Rep: Reputation: 0
can not delete NON-EMPTY directories through samba share


Hi all,

I have setup a Samba server as file and print server. Everything works perfectly, I can print, I can write, delete files through Samba. But, the only thing that does not work is to delete a NON-EMPTY directory. No error message received, just don't want to delete it. As soon as I delete all files from the directory, then the directory can be deleted too. The problem is recursive for subdirectories.

The shared folder is owned by root : products_admin
drwxrwsr-x 2 root products_admins 4096 Feb 13 07:56 data

This directory contains another directory created through his samba share
drwxrwsr-x 2 bas products_admins 4096 Feb 14 09:08 a_new_directory

As you can see, the directory is owned by user bas (that would be me) and by the group products_admin.
User bas is member of group products_admin.

The content of directory a_new_directory:
-rwxrwxr-x 1 bas products_admins 6769 Dec 12 10:14 softice.txt

I am trying to delete the directory with the same user bas, but this only succeeds when the directory is empty. Still I can rename it independently of it's content.

I know that in UNIX world, you can delete a folder which has some contents, only if you delete it's contents recursively. This should be specified in command line using option -R (-r). By default UNIX does not ask you if you want to delete the content of the directory. It's just give you an error message saying that what are you trying to delete is a directory (he thinks that you don't know that ) I think here is the same kind of problem.

Just think how awful is to delete a directory with lots of subdirectories. I don't think it's a permission problem (it can't be) and I could't find any posts on this problem over the internet.

Thanks for help,
Sandor

Last edited by Sandor; 02-14-2006 at 05:23 AM.
 
Old 02-15-2006, 02:19 PM   #2
Dmjmusser
Member
 
Registered: Nov 2005
Location: Detroit, Michigan -- USA
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
I'm not sure how Unix commands differ from the Samba commands, but on Fedora I can run these commands to remove a non-empty directory:

rmdir --ignore-fail-on-non-empty directory_path
or this
rm -drf directory_path

Not sure if that'll work when logged into Samba, but it might be worth a shot.

~Myles
 
Old 02-16-2006, 03:06 AM   #3
Sandor
LQ Newbie
 
Registered: Feb 2006
Posts: 2

Original Poster
Rep: Reputation: 0
hi,

I think it is working now
I just need to use the correct tool
Windows Commander 5.11 does not work (maybe some config will correct the problem). A newer version (Total Commander) is working and also Windows Explorer
That's why I didn't find anybody with such problem.

Hope this helps others too

Sandor
 
  


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
How to delete non-empty directories? Also have a terminal question Nylex Linux - General 10 07-15-2005 11:51 PM
how to search for and delete empty directories? BrianK Programming 4 06-03-2005 07:24 AM
samba share with write but not delete Red Squirrel Linux - Software 7 08-29-2004 06:12 PM
Removing non-empty directories brunnopessoa Linux - Newbie 8 11-13-2003 07:56 PM
how do I remove all empty directories? noisybastard Linux - General 2 08-10-2003 11:47 PM


All times are GMT -5. The time now is 02:21 AM.

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