Can't delete files, permissions issue

Status
Not open for further replies.

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Hi all,

I've got a small selection of files which I can't delete.
I'm still new to all this but if I navigate to them in a telnet session I get the following information

[root@freenas] /<SNIP># ls -l
total 4030982
drwxrwxrwx 2 root nogroup 4 Aug 26 11:49 ./
drwxrwxrwx 107 root nogroup 108 Aug 3 14:00 ../
-rwxrwxrwx 1 root nogroup 92 Oct 4 2013 <FILENAME01.txt*>
-rwxrwxrwx 1 root nogroup 4123409661 Oct 5 2013 <FILENAME02.mkv*>


I can delete these fine from a putty / telnet session if I navigate manually to the location.
Windows Explorer refuses to delete them.
I'm a newb but I'm setting chmod -R 777 on all kinds of files just to stop general permissions issues I'm having.
What am I doing wrong, why can I not delete these under Windows?
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
NOTE: Error message from Windows Explorer.
The action can't be completed because the file is open in another program
(This is definitely not the case)
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I didn't want to but I rebooted the server, didn't fix it (that's actually good) - I don't want weird intermittant behaviour. Still no idea what's going on though
 

esamett

Patron
Joined
May 28, 2011
Messages
345
There is a known problem with permissions and windows. Search terms Cifs. Samba. Permissions. Windows acl.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Is there a solution? I'll do a search now.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
There is a known problem with permissions and windows. Search terms Cifs. Samba. Permissions. Windows acl.
There are zero issues with cifs and permissions. There are only issue with users doing it wrong. I'm assuming your issue is that the user trying to delete the file doesn't have write access in the directory. Because you are modifying a directory when you remove files from it the user doing the delete needs correct permissions on the directory.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I literally just went to the exact directory, right clicked and chose "new file" and made a text document called "nope.txt"
I then deleted it.
Still can't delete the 2 other files, in the same directory...... even after doing chmod on the files (777)
So.... something is going on.
 

esamett

Patron
Joined
May 28, 2011
Messages
345
"Issue with" is not implying defect or fault. It is important to me to validate the OP original concern that problems with permissions are happening to others. Based upon my reading in this forum the correct use and modification of permissions and acls for windows users is a nontrivial subject with significant pitfalls for which an easy to use and understand guide is not readily available. It is understandable to me that those coming to this forum may use common commands that have unintended results in this context.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I seriously have no idea what you're saying.

I can delete all files via shell.
I can not delete particular files via Windows
I have rebooted the server
I have stopped and started the CIFS service
I have manually set permissions to 777 on the files.
I have created a file in the SAME DIRECTORY as the files with the problem and can delete those without issue.
 
Last edited:

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I'm sorry to keep bumping this but can any gurus please take a peek? It's an odd problem, I can fix it manually but I'd like to get to the core of the issue instead.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
What user are you mounting the share as? Which permissions setup are you using (Windows or UNIX)? I think the reason why you're not getting answers is cause you didn't give enough information. That, and I think people just don't care too much about permission issues cause it's kinda' hard to troubleshoot since everyone's got a different setup.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I may be mounting as guest but it shouldn't matter, please take note of the details.
I can read and write from the SAME FOLDER as the files with the problem
I have logged in as root into a shell account and chmod'd the files to 777, anyone should be able to work with the files

permissions1_9hkj8tl3iu.jpg
permissions2_b5tsdx0ixn.jpg
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Unless you have a specific need to use Unix ACLs, set permission type to Windows / MAC ACL. Set the owner user and group to the one that you will use to administer the share. Open "sharing" -> "windows (CIFS) shares". Click on your share. Click on "apply default permissions" then "OK". This part may take a while. Wait for it to complete. This should undo all of the fiddling that you've done thus far and give you a clean slate to work from. Once it is done, configure permissions via windows explorer by right-clicking on your share, clicking on "properties", and clicking on the "security" tab. For an explanation of windows permissions see here: http://windows.microsoft.com/en-us/windows/what-are-permissions#1TC=windows-7

Permissions work properly in CIFS but there is a learning curve.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
I may be mounting as guest but it shouldn't matter, please take note of the details.
I can read and write from the SAME FOLDER as the files with the problem
I have logged in as root into a shell account and chmod'd the files to 777, anyone should be able to work with the files
You're wrong, it WOULD matter because permissions on the web UI only sets the permission of the dataset itself, not anything contained in the dataset (unless you check the recursive box and confirm it, note that this will take a while depending on how many files you have in the dataset).
And chmod would only fix permissions for the files that you perform chmod on, not all future files created by other users.
Any new file generated will be created under whatever user is currently logged on (this is why you can create a new file and delete it right away on the explorer window since Guest created it, it will be owned by Guest) unless you have modified the default behavior to do otherwise (changing umask or ACL's).

You need to give us the output of the real listing of the folder for us to be able to really help you out: ls -l (inside the folder with the offending files)
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
You're wrong, it WOULD matter because permissions on the web UI only sets the permission of the dataset itself, not anything contained in the dataset (unless you check the recursive box and confirm it, note that this will take a while depending on how many files you have in the dataset).

Ticked recursive when I first created the dataset, just went in, edited permissions of the dataset and set it again.
I'll try that, thanks.
 
Status
Not open for further replies.
Top