gabbott Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
Ostrich Posted October 9, 2012 Share Posted October 9, 2012 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 Quote Link to comment
Joe L. Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
jumperalex Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
Joe L. Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
jumperalex Posted October 9, 2012 Share Posted October 9, 2012 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? Quote Link to comment
JustinChase Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
PeteAron Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
optiman Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
Influencer Posted October 9, 2012 Share Posted October 9, 2012 You can run it as often as you'd like, all it does is chmod and chown your data chmod -R go-rwx, u-x, g+u,ug+x "$1" chown -R nobody:users "$1" That's equal to octal permission 770. Quote Link to comment
B1G Posted October 9, 2012 Share Posted October 9, 2012 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 Quote Link to comment
Influencer Posted October 9, 2012 Share Posted October 9, 2012 manually change the commands, it could be that the permissions script isn't finishing (or you aren't giving it sufficient time to finish) chown -R nobody:users /path/in/question chmod -R 770 /path/in/question Quote Link to comment
xamindar Posted October 9, 2012 Share Posted October 9, 2012 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. Quote Link to comment
B1G Posted October 10, 2012 Share Posted October 10, 2012 manually change the commands, it could be that the permissions script isn't finishing (or you aren't giving it sufficient time to finish) chown -R nobody:users /path/in/question chmod -R 770 /path/in/question Thank you. That worked Quote Link to comment
gabbott Posted October 10, 2012 Share Posted October 10, 2012 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. Quote Link to comment
dgaschk Posted October 10, 2012 Share Posted October 10, 2012 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. Quote Link to comment
tyrindor Posted October 10, 2012 Share Posted October 10, 2012 The samba issue (not being able to delete some files, etc) was already confirmed to be an issue with samba. You can either update it manually, or wait for the next unraid RC. Quote Link to comment
whiteatom Posted October 11, 2012 Share Posted October 11, 2012 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 Quote Link to comment
PeterB Posted October 12, 2012 Share Posted October 12, 2012 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. Quote Link to comment
optiman Posted October 12, 2012 Share Posted October 12, 2012 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 Quote Link to comment
DoeBoye Posted October 12, 2012 Share Posted October 12, 2012 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? Quote Link to comment
whiteatom Posted October 13, 2012 Share Posted October 13, 2012 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 Quote Link to comment
optiman Posted October 13, 2012 Share Posted October 13, 2012 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/ Quote Link to comment
dalben Posted October 13, 2012 Share Posted October 13, 2012 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. Quote Link to comment
dgaschk Posted October 14, 2012 Share Posted October 14, 2012 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. Quote Link to comment
Recommended Posts
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.