cifs share not allowing applications write permission?

JJD

Dabbler
Joined
Jan 17, 2014
Messages
22
my share issue was fixed after the upgrade and a chmod of everything 777 I was running with unix permissions because of the mixed systems I have. it was just in windows that users could write but could not write from within programs (ex. saving an updated word doc, they would have to save locally and use explorer to overwrite the old doc). i think it was somehow confused and trying to use both unix and acl permissions or something... at least that's the only explanation i can think of...
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
I'm using UNIX permissions. The box that's been having access issues runs Ubuntu 12.04 LTS.

At any rate, it was working in 9.2.0 and was then broken. I don't think it's an unreasonable expectation that it should work as it previously did after an upgrade. It's also confusing that getfacl shows the expected ACLs on the file and yet those are not the applied permissions. I think there's something else going on that probably needs to be looked at, possibly only affecting upgrades and not new deployments.

It probably would have been a good idea to put Samba 4 into a major release (like 9.3) instead of a point release. My fault for not understanding the implications of the migration, but I certainly would have done more research on something that's a major release.

How are (were) you mounting the share in Ubuntu?

I ask because I found that I in my case with Ubuntu 12.04 (which runs my Plex server) I had to change my cifs mount (in /etc/fstab) to indicate a local UID and GID after upgrading FreeNAS to 9.2.1.2. (In my case I mounded with the Plex UID and GID.)
 

Jamie Gruener

Dabbler
Joined
Jan 20, 2014
Messages
18
I don't want to hijack this thread, but it seems to be so close to the problem I'm having, it seems appropriate. Please tell me if I should open a new thread or not.

We have a FreeNAS 9.2.1.5-RELASE instance with several CIFS shares. Accessing and using these shares from Windows 7 clients works just fine, until we throw some CentOS boxes into the mix.

I have a CentOS 6.5 client running mount.cifs 6.4 (upgraded manually, comes with 4.8.1). It's a minimal install (it's actually a server template for us).

My mount command:
mount -t cifs //server/share /mnt/share/ -o username=my_username,uid=root,gid=root,domain=my_domain,sec=ntlmv2,cifsacl

First I just create a file and get the permissions:
[root@localhost share]# touch file1
[root@localhost share]# getcifsacl file1
REVISION:0x1
CONTROL:0x8004
OWNER:S-1-5-21-[my_domain_id]-3360
GROUP:S-1-5-21-[my_domain_id]-513
ACL:S-1-5-21-[my_domain_id]-3360:ALLOWED/0x0/FULL
ACL:S-1-5-21-[my_domain_id]-513:ALLOWED/0x0/FULL


Looks good!

Then I edit the file and get permissions again:
[root@localhost share]# vi file1 (added a couple of words then saved)
[root@localhost share]# getcifsacl file1
REVISION:0x1
CONTROL:0x8004
OWNER:S-1-5-21-[my_domain_id]-3360
GROUP:S-1-5-21-[my_domain_id]-513
ACL:S-1-5-21-[my_domain_id]-3360:DENIED/0x0/0x27
ACL:S-1-5-21-[my_domain_id]-3360:ALLOWED/0x0/FULL
ACL:S-1-5-21-[my_domain_id]-3360:ALLOWED/0x0/0x1e0198
ACL:S-1-5-21-[my_domain_id]-513:ALLOWED/0x0/0x1200af
ACL:S-1-1-0:ALLOWED/0x0/0x120088


What happened?! This also happens if I use vi to create the file (permissions are good on first save) and then edit (permissions are wrong).

Windows permissions also accurate reflect these permissions.

If I create files in Windows, the permissions are assigned as expected upon file creation and are not changed after files are edited and saved.

So, why are the permissions changing on the second write of a file?

I've tried using or not using uid, gid, noperm, cifsacl, though I haven't done every possible permutation.

Any thoughts of things to try?
 

esamett

Patron
Joined
May 28, 2011
Messages
345
I posted my problem on the Noob section
 

HRS

Dabbler
Joined
Aug 4, 2014
Messages
39
I've encountered a similar problem using FreeNAS 9.2.1.6.
The CIFS shares are exported as read-only.
Various tips in the forums did not fix the problem.

The documentation (http://web.freenas.org/images/resources/freenas9.2.1/freenas9.2.1_guide.pdf , sec 7.3.2 on pg. 157) states that a guest user should be defined and assigned to have the share as a home directory and (what is worse) defined as the global guest account in the CIFS settings.
This setup does work, and the share is exported with read-write permissions. However, I don't see how this can apply to numerous shares, where I have to assign different "guest" users, each with a home directory corresponding to the share, but the global CIFS settings can only support 1 guest account.

Additionally the documentation states that one needs to set "Authentication Model: Anonymous" in the CIFS global settings, however that option ("Authentication Model") is not available from the web GUI
 

Inam

Cadet
Joined
Mar 22, 2017
Messages
2
I am very new to Nas4Free and have issue related to permission. I am running latest release. and Installed today. 10.3.0.3.4068

1) I have 4 different users have same permission.
2) The user 2 can read and write in the share folder but other users can not write on the folder at all.
3) When ever tried to write in the folder through windows 10 i get " Destination Folder Access Denied" " You need permission to perform the action.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Neither Windows 7 nor 10 can write to FreeNAS.

I'd appreciate help -- ideally, in the form of what specifically might solve the problem.

I believe someone posted the class schedule and prerequisites for an IT degree above ... as a solution? Or maybe it was a 2000-word-wall of text.

But -- 16-20 hours is my quota. If at all possible I'd like to pay my rent this month - which I can't do if I have to debug this.
All of MY computers can read and write to my shared folders between them. It's just freeNAS that can't right now.


1. FreeNAS' SMB service will not start.

2. NFS share via Win 7 & 10 can't write:
- 10 says the file already exists (when it doesn't)
- 7 says I don't have permission




Literally, I HAVE to get some work done. I can't try to make the most basic and fundamental aspect of a NAS work any more.
I'm contemplating reverting to QNAP. It's absurd how much time I have to spend on this ...
If you want help, you should probably start a new thread with detailed information about your problem (perhaps even a debug file).
 
Top