Recycle Bin subfolders and files are 700 (Owner RWX)

Status
Not open for further replies.

True_Blue

Dabbler
Joined
Jan 28, 2012
Messages
11
When I delete an item, it goes to my Recycle Bin as intended, in the .recycle folder. But the files and folders I delete are now 700 permission. How do I make FreeNAS make the items located in .recycle as 777 by default. Right now, I have to delete files in .recycle by ssh-ing to my box and deleting them as root. I want to delete them from my Windows machine.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Short answer, I don't think you can with builtin features. You could setup a cronjob to change the permissions every 10 minutes or so, but then you have other potential security issues.

In an environment where you have multiple users accessing the same share you use permissions to control who can access what data. For instance, you wouldn't want the whole company to have access to SSNs. When a file is deleted(aka moved to the recycle bin) the only user who can access the file then is the admin(who is also the person to empty the recycle bin). By changing to 777 you are allowing everyone with share access to see any data that has been deleted. For home use, you probably won't care. But in a business setting you could be breaking privacy laws.

In short, I'd never expect FreeNAS to ever chance this behavior, but you could force it with a cronjob that runs regularly. All I do is setup a cronjob to empty files from the recycle bins after they've been there for 5 days. That way if I delete something on accident I can fix it but I don't have to babysit the recycle bin folder either. The thread with instructions to do this is in the forum somewhere(I made the thread).
 

True_Blue

Dabbler
Joined
Jan 28, 2012
Messages
11
I'm not quite sure why I am not able to delete things under the .recycle dir.

1) CIFS service has Authentication Model set to Anonymous and the guest account to nobody.
2) CIFS share has Allow Guest Access and Only Allow Guest Access checkmarked.
3) The Volume has Owner as root and Group as wheel, with everything checkmarked under Mode.

In the previous version of FreeNAS I had no problem deleting things or seeing things in the Recycle Bin. It seems when I upgraded and did a fresh install, its possible I missed a permissions setting somewhere?

Any help is appreciated.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If you are using anonymous then you aren't logging in as root. 700 means owner only(which is most likely root). It could be there was a permissions bug in the old FreeNAS version that is fixed now?
 

True_Blue

Dabbler
Joined
Jan 28, 2012
Messages
11
I tried updating to the newest BETA through the GUI, but the problem still persists. My CIFS share is set to Anonymous and the guest user is nobody. When I am on the Windows machine and delete something, it creates a nobody dir under .recycle, but when I go to open the nobody folder, it throws me an error saying I do not have permission. If I set the folder to 777, then I have no problem getting into the directory.

I have no clue what could be wrong since I know I am the user nobody, since when I delete something that is the folder that is created. If I ssh to my machine and do a ls -l, then it shows the directory as being owned by nobody with permissions 700. But I can't seem to get in the dir, or delete anything in there.

As I said before, I had no problem with older versions of FreeNAS, so I am kind of at a loss. Right now I ssh to my box and as root I delete things. I can set up a crontab to do so also after a certain amount of time, but I would love to have the option to browse the nobody dir under the .recycle folder. I honestly have no clue why this happens. I guess I could try a fresh install, but I don't have faith that would do anything.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
As cyberjock alluded to, if your old version was 8.0.4 or earlier, perhaps it "worked" due to a vulnerability in the OS.

"FreeNAS 8.0.4 and earlier may be affected by a critical Samba vulnerability - all users who use CIFS are urged to update."

As I said before, I had no problem with older versions of FreeNAS
 

True_Blue

Dabbler
Joined
Jan 28, 2012
Messages
11
That's possible, but I thought the last time I saw it "working" was 8.2, but you could be right.

I guess my next question would be does everyone else's Recycle Bin work the same way? Does anyone else use Anonymous and then have a user set up for their guest account, that deletes things in Windows and it creates a folder for that user under .recycle, but when going to browse that folder, is refused the ability to do anything within that folder?

I always liked the idea that on my Windows machine I could delete things, then go to the Recycle Bin and delete things. I guess its possible that other people think a user could delete things, but not permanently delete them from the hard drive.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Personally, I've always been a bit disappointed that there wasn't some kind of recycle bin feature for Windows network shares. Of course this isn't really practical because the only way to move files to your recycle bin would be to actually move the file from the network share to your recycle bin. And that would be stupid for big files. Why would you move a big file that's 8GB or something across your network to your local machine just to put it in your recycle bin?

I find that the recycle bin created with FreeNAS seems to work quite well. The files are organized by who deleted them and where they were, so recovery is possible before the "recycle bin" is emptied.
 
Status
Not open for further replies.
Top