unRAID Server Release 5.0-rc8a Available


limetech

Recommended Posts

 

 

When unable to delete through SAMBA, is it on a user-share, or on a disk share?

 

Joe L.

 

I've experienced the issue with deleting files through SAMBA and the problem has exhibited itself when I try to delete the file through both a user share and a disk share.

 

Also, I'm able to delete when I telnet into my unraid box through /mnt/user/sharename/file

 

However I noticed something strange... when I do that and then rewrite the file through SAMBA, the owner of the file (instead of being root or nobody, I forget which it is supposed to be offhand) that particular file will actually be set to the actual user I used to write the file as the owner.

Link to comment
  • Replies 418
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

All are through user shares. So through SAMBA (through windows) tried to delete /mnt/user/sharename/file, get error.

Delete same file through telnet and it works fine.

 

<edit> Appears to be intermittent file access across a number of shares, some will delete, some wont

 

 

Link to comment

However I noticed something strange... when I do that and then rewrite the file through SAMBA, the owner of the file (instead of being root or nobody, I forget which it is supposed to be offhand) that particular file will actually be set to the actual user I used to write the file as the owner.

Interesting...  It then points to a permission issue with the wrong user/group being assigned by SAMBA.  (It does explain why the newer version of SAMBA can fix it.  It also can explain why even the newer version of samba cannot deal with older files, created with the wrong permissions using the older version of  SAMBA.

 

It make me think after installing the new version of samba you need to run the Fix-Permissions utility.

 

Thanks for the analysis and feedback.

 

Joe L.

Link to comment

Uggg too late for me to test :(  I have the new SAMBA version and just last night ran across another file I couldn't delete.  So I did it via shell.  Im' tempted to not run the new permissions script just to see if I run across the issue again and then can test the theory.

If you run into it again, and can look via telnet at the file ownership and permissions, and then run the new permissions script and then attempt to delete the file via samba, it will give more clues.

 

It does explain why some who install the updated SAMBA still have issues as the files they are attempting to delete were created with wrong ownership/permissions when using the older SAMBA version.

 

Joe L.

Link to comment

Uggg too late for me to test :(  I have the new SAMBA version and just last night ran across another file I couldn't delete.  So I did it via shell.  Im' tempted to not run the new permissions script just to see if I run across the issue again and then can test the theory.

If you run into it again, and can look via telnet at the file ownership and permissions, and then run the new permissions script and then attempt to delete the file via samba, it will give more clues.

 

It does explain why some who install the updated SAMBA still have issues as the files they are attempting to delete were created with wrong ownership/permissions when using the older SAMBA version.

 

Joe L.

 

Indeed and I know for SURE that the file I was having trouble deleting was created before I installed the new samba version. 

 

I guess the question is ... can't we pull a report of all file ownership / permissions and see if any are wrong?  Maybe a listing of files that do NOT have the correct owner/perms?

 

Link to comment

I can report that I've also run across the occasional issue where I cannot delete some files.  Sometimes I can not delete from one machine, but can delete from another machine.

 

However, being naive, I just guessed that running the newperms script would help, and it does.  Whenever I've run across an 'un-deletable' file, I run the newperms script on the user share, and then I have always been able to delete.

 

I've recently added the samba upgrade to the Go file, then rebooted, and just yesterday I ran across another few files with permissions errors.  I ran the newperms script and was able to delete/use the files in question.  I hope that this issue will finally be resolved with the new Samba version.

Link to comment

If we havent seen this issue yet (having not tried to delete files), should we run the permissions fix script after installing the latest rc?  I have some files to delete but I can wait until I am sure I wont have to deal with potential problems.

 

thanks!

 

However I noticed something strange... when I do that and then rewrite the file through SAMBA, the owner of the file (instead of being root or nobody, I forget which it is supposed to be offhand) that particular file will actually be set to the actual user I used to write the file as the owner.

Interesting...  It then points to a permission issue with the wrong user/group being assigned by SAMBA.  (It does explain why the newer version of SAMBA can fix it.  It also can explain why even the newer version of samba cannot deal with older files, created with the wrong permissions using the older version of  SAMBA.

 

It make me think after installing the new version of samba you need to run the Fix-Permissions utility.

 

Thanks for the analysis and feedback.

 

Joe L.

Link to comment

I don't recall which thread it was in, but somewhere we were told that we could run the New Permissions button any time there were issues with permissions.  We were told that we had to run it after going to one of the RC's.  Given it just resets permissions back to what they should be, I wouldn't think it could cause any harm in running it again after the recent RC and after updating SAMBA.  In fact we should be able to run as much as you want without harm.

 

Maybe Joe or Tom can confirm that.

 

Link to comment

I have a similar problem... But in my case I can't access the file. I get an "You don't have the correct permission to access file location" On just one folder and its files and a few files from another folder. Can't delete, can't view, can't create a folder in that particular folder...

 

 

 

I've tried running the PERMISSIONS routine a few times now, with no success.  :'(

 

I can view the pics using the unRaid UI. So I know the files are not currupt.

 

Windows security says: Unable to display current owner

Link to comment

all of you with samba issues, are you positive you did NOT set up users for write access in unraid? You are still able to connect to your unraid shares in this case, but are unable to make modifications due to samba security.

 

Try maping the share as a drive and connect to it using your credentials set up in unraid if you had done that.

 

I think this version of unraid configures samba incorrectly where it alows you to still connect with invalid cradentials but with only readonly access.

Link to comment

all of you with samba issues, are you positive you did NOT set up users for write access in unraid? You are still able to connect to your unraid shares in this case, but are unable to make modifications due to samba security.

 

Try maping the share as a drive and connect to it using your credentials set up in unraid if you had done that.

 

I think this version of unraid configures samba incorrectly where it alows you to still connect with invalid cradentials but with only readonly access.

 

Nope, for me that's not the problem. Because I can write to my shares (however files are now getting written with that user as owner which should not be happening, should be set to owner of nobody) and it is only certain files that I cannot overwrite/delete.

Link to comment

all of you with samba issues, are you positive you did NOT set up users for write access in unraid? You are still able to connect to your unraid shares in this case, but are unable to make modifications due to samba security.

 

Try maping the share as a drive and connect to it using your credentials set up in unraid if you had done that.

 

I think this version of unraid configures samba incorrectly where it alows you to still connect with invalid cradentials but with only readonly access.

 

Nope, for me that's not the problem. Because I can write to my shares (however files are now getting written with that user as owner which should not be happening, should be set to owner of nobody) and it is only certain files that I cannot overwrite/delete.

 

The nobody account is only used for guest access. The user name is not important as long as the group name is correct and permissions are 770 (This why the new permissions script sets the files to nobody.). The user account login is used as the owner of files that that user creates. This does not affect share security which is done on a per share basis and does not use unix permissions.

 

Link to comment

Not really the right place for this I know, but to help the people with the permissions issues....

 

As has been discussed - this is a SMB issue, not an unRAID one. When files are being added over the network, the permissions are wonky. If you put the following in your /boot/config/smb-extra.conf all of the files you add over the network will get 666/777 permissions. So I set my permissions initially with the fix permissions and now use smb for new files and have no problems. I have also set SABNZBD to write files with the 666/777 permissions.

 

[Global]
  force create mode = 0666
  force directory mode = 0777
  force user = nobody
  force group = users
  create mask = 0666

 

Hope that helps someone.

 

Cheers,

 

whiteatom

Link to comment
In fact we should be able to run as much as you want without harm.

 

... except that it may change file attributes for files belonging to applications which run on the server, causing some consternation for those applications - eg, Logitech Media Server (was Squeezbox server), dnsmasq, etc.

Link to comment

I had TimeMachine working, but now notice that the backup has been failing.  I'm not sure if the latest RC did that or not, so just checking with this group.

 

I had it setup to use a specfiic disk, as advised in a previous thread.  I can connect to the TimeMachine share with my imac and the settings all look correct on the unraid page.  However, I get an error on my imac saying the disk couldn't be found when the Backup tries to run.

 

I'm using the User Share, set to AFP (TimeMachine) and security is set to Private, with Read/Write for a specific user.  I Include only 1 disk, and Exclude all others.  Size limit set and there is lots of free space on that drive.

 

Another issue I have is that I was using another disk in the past, but it ran out of space so reconfigured to use a different disk.  I'm now unable to delete the old TimeMachine directory on the disk I'm nolonger using.  There isn't much in that directory, just a few Apple files and a directory called AppleDB.  I've tried connecting to the Disk share and I've tried both SMB and AFP, but I get the error saying I don't have permission to delete those files and that directory.

 

Thanks

Link to comment

Switchblade. The only way I've found to get rid of the .apple files is to shut off AFP, delete from telnet, and turn AFP back on.

 

Cheers,

whiteatom

 

Thanks!  I'll try that...just need to look up the commands again, I don't use Telnet much because it scares me and I'm a Windows guy.

 

If I'm on the console, is this the correct command  /mnt/disk2# rm -rf TimeMachine/

 

Link to comment

Just to add my 2cents.

 

I tried deleting a file through Samba (not upgraded version), on a user share, and file would delete, only to reappear on refresh... Deleted through disk share, and permanently deleted...

 

First time I've seen that... Related issue?

 

This is the samba issue that's been reported.  There is a work around on this thread that involves downloading the latest samba and manually installing it on boot.

Link to comment

Switchblade. The only way I've found to get rid of the .apple files is to shut off AFP, delete from telnet, and turn AFP back on.

 

Cheers,

whiteatom

 

Thanks!  I'll try that...just need to look up the commands again, I don't use Telnet much because it scares me and I'm a Windows guy.

 

If I'm on the console, is this the correct command  /mnt/disk2# rm -rf TimeMachine/

 

Yes.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.