No permission to open/save existing file

Status
Not open for further replies.

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
FreeNAS-9.2.1.8-RELEASE-x64 (e625626), clean install.

I have a user called "admin" who primary group is group 'admin'.

I created a dataset called 'ftptemp' (unix) and set permissions to:
user 'root' (R/W/E), group 'admin' (R/W/E), Other (nothing ticked).
Unix/Mac selected.

I then created a windows share:
Name: ftptemp
Path: /mnt/vol1/ftptemp
Apply Default Permissions: Ticked
Export Recycle Bin : Ticked
Show Hidden Files: Ticked
All other options are unticked

I then went into the shell ( [root@JOE-FREENAS ~]# )

and FTP'ed a load of files from my Netgear NAS to the 'ftptemp' folder.

I copied tons of files.

In windows, I added a mapped drive, and logged in as "admin".

In windows, I can Open, copy, create files and folders.

The problems I'm having are:

- If i open a file and edit it, i cannot save it.

- If i delete a file, it does not appear in my recycle bin, it's gone forever.


Is this correct? Why can't i save the modified file?

I went back into the dataset permissions dialog and they are set as above. I clicked Set permission recursively and clicked ok, but the issue is the same.

Windows security dialog (properties of a file) shows user "admin(Unix Group\admin)" has Read, Read & Execute, but not write!

If i create a file, the security dialog shows user "admin(Unix Group\admin)" has only Read ticked.
It also has a user "Administrator (JOE-FREENAS\admin) which has 'Read' and 'Write' checked.

I have full read and write access to the file i created.
 
D

dlavigne

Guest
You should use Windows permissions for CIFS shares and the dataset for the share should be set to Windows. Then, fine-tune the permissions using the Windows client. Anything else gets mucky.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
OK, i've done that and checked the recircivly check box.

Now this works, most of the time. I mean every now and then a file is "in use by another program" and i have to go back to freenas storage, check the recirsivly box again and click ok to get control of the file.

The happens EVERY TIME i move a file on the server.... So so annoying! Is this a bug or by design!?
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Hi no its all different files for edit and delete, or folders in the case of trying to delete/rename. It's insanely annoying!
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Any idea how to fix the export to recycle bin issue?
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
OK, this is causing me issues again. FreeNAS-9.3-STABLE-201503150158

It now appears to only be .txt files. I have only tried jpg and png as thats pretty much all i have.

I have accessed the folder(dataset/share) using 'admin' in windows when the popup login appears.

The permissions are set to Unix:
Owner(user) root
Owner(group) admin

Owner & group R/W/E checked
Other R/W/E unchecked.

I cannot save a text file that i open and edit.

I can open and edit jpg and png files.

In windows, the file properties shows the file owner is root. This is the case for the image file too.
After saving the image files, the owner changes to admin.

So now i cannot edit text files anymore. No matter what i set permissions to, i cannot regain control of the files.

Any ideas? Yes i can make a copy and rename, but that's not really a fix, just side-stepping the issue.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Really, no replies?

I have a program that I use every day, and it saves as a .prj file. Every time I restart my PC, I have to go to freenas, storage, set permissions, tick the recursive box, no other changes, click ok, THEN the program can access the .prj file.

This is a bug, can someone please work with me to fix this, please! It's driving me nuts. I still have no access to any text files.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Use Windows permissions with Windows shares.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Really, no replies?

I have a program that I use every day, and it saves as a .prj file. Every time I restart my PC, I have to go to freenas, storage, set permissions, tick the recursive box, no other changes, click ok, THEN the program can access the .prj file.

This is a bug, can someone please work with me to fix this, please! It's driving me nuts. I still have no access to any text files.

As @Ericloewe said, this is not a bug. You just aren't using FreeNAS properly.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Ok, any clues to what i'm doing wrong? It's a really simple set up. Everything is set to the same permissions. But i have to refresh those permissions to get access each time i reboot the pc.
Use windows permissions is not the answer. It should work just as it is.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Ummm.... If you would have looked at the permissions on the file you would have seen that group doesn't have write permissions when files are created over cifs. To fix this set your cifs umask for files to be 0664. This will give owner and group read/write and other read. While you are in there make your directory mask 0775 so you can create file and change directories as owner and group and other can read and change directories. This might fix all your problems including recycle bin. I use Unix permissions with cifs shares because it works better than acls and is more simple for a hone environment.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Thanks for the reply. I'm using the GUI to set the permissions. I have set owner(root) and group(admin) to read/write/exe, but in windows, looking at the file permissions, "admin (Unix Group\admin)" only has "read & exceute" and "read" ticked.

So is the GUI setting the permissions correctly? It doesn't appear to be.

So i tried setting owner, group and other to R/W/E, and the same is true when viewing the permissions.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
If you are using Unix permissions you can't set them using Windows security settings you will need to use the CLI or know exactly how windows maps to Unix and that isn't simple.

We it is simply but probably over most people head.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
I'm using the FreeNAS web GUI
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I'm using the FreeNAS web GUI
what is your problem! follow directions or you will never figure out your problem. I have never mentioned the freenas web gui in any of my answers and solutions to your question. That is because the freenas gui isn't your problem your problem is that you don't know how things work so i gave you a simple answer the first time and told you exactly what you needed to do and that was modify your umask settings. You are the exact reason why people don't bother with permission questions on here. Either you follow my directions or you don't either way you are not going to get any help.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
When you said this: "you can't set them using Windows security settings", i thought you thought i was trying to set permissions from windows, which is why i mentioned using the GUI to set the file permissions. OK, so we're established that the freenas GUI doesn't set file permissions to what i thought it would e.g. 644... so i need to use the CLI to do it.

If you'd have said that the GUI doesn't set file permissions in the first place, i would be alot further on with solving this than i currently am.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
OK, following what @Ericloewe said, above: I have changed the permission type to Windows.
Owner user: root
Owner group: admin.

I then deleted all my shares, and recreated a single share by following the official FreeNas guide, here: http://doc.freenas.org/9.3/freenas_...henticated-access-without-a-domain-controller


Everything was working just fine. I networked drive'ed the share as "Z:" and set credentials as 'admin' and used the password that i set for user 'admin', ticked remember credentials in windows.

Then, out of the blue and for no reason, about 4 hrs later the .prj file suddenly becomes read-only all by its-self and I don't have permission to change it back.

I then went into freenas again, clicked on the storage dataset, clicked change permissions, left everything as they were but ticked recursive (it is set to windows), and clicked ok. The read-only file changed back to writable and i managed to save my work.

Why does this happen? I just cant understand why things are changing all by their self?

Do i need to CLI something and if so, what is the command i need to run... I'm used to windows and GUI for stuff, CLI, dos, linux etc is just not for me. I dont need complex permissions etc, i just need a username and password to access a share, one share, to stop others on this network from accessing the files, and plex, which has worked perfectly since install 3 months ago.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Set yourself as the owner of the shared dataset and see if that helps.
 

JoeB

Contributor
Joined
Oct 16, 2014
Messages
121
Thanks. I did that, but about 3hrs later, it's done it again, the file has magicly changed to readonly.
 
Status
Not open for further replies.
Top