Windows sharing CIFS

Status
Not open for further replies.

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Hmm, this is definitely fixable, but those ACLs have always been a bit weird. Do you have UNIX or Windows ACLs on this volume? In the shell if you do an "ls -la" what are the permissions (drwxrwxrwx) of the files and directories? Which user and group owns them? Which user do you have set up in the CIFS configuration?
 

dhawk312

Dabbler
Joined
Jul 29, 2011
Messages
19
I left the default ACL setting of UNIX. I've had everything setup with root:wheel for about 7 months. Everything ran perfectly with this setup until I updated to 8.0.4. After updating I started receiving permission errors so I went through the documentation and followed the CIFs setup to a T. I changed my owner:group to guest:guest per the instructions and set full anon access.

Here is the output when I run "ls -la":

[root@Server /root]# ls -la
total 39
drwxr-xr-x 2 root wheel 512 Mar 7 04:05 .
drwxr-xr-x 20 root wheel 512 Mar 8 00:41 ..
-rw-r--r-- 1 root wheel 919 Mar 7 02:02 .cshrc
-rw-r--r-- 1 root wheel 148 Mar 7 04:05 .k5login
-rw-r--r-- 1 root wheel 296 Mar 7 04:05 .login
-rw-r--r-- 1 root wheel 489 Mar 7 02:02 .profile
-rw-r--r-- 1 root wheel 1128 Mar 7 02:02 .shrc
-rwxr-xr-x 1 root wheel 1677 Mar 7 02:00 change_password
-rwxr-xr-x 1 root wheel 1630 Mar 7 02:00 save_cfg
-rwxr-xr-x 1 root wheel 426 Mar 7 02:02 save_rrds.sh
-rwxr-xr-x 1 root wheel 1591 Mar 7 02:00 save_sshkeys
-rwxr-xr-x 1 root wheel 1575 Mar 7 02:02 update
-rwxr-xr-x 1 root wheel 2780 Mar 7 02:02 updatep1
-rwxr-xr-x 1 root wheel 3056 Mar 7 02:02 updatep2


When I click through the webUI to Volume-->Change Permissions of the main server directory just now I noticed that Owner/Group/Other all of have Read and Execute access checked, NONE have Write access checked, and Set Permissions Recursively is not checked. I've checked all of these boxes and saved it but it keeps reverting back to these settings after a reboot.
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Can you do an "ls -l" on one of the directories of the data volume? It's possible that besides a chown you also need to do a chmod. It would be useful to see a comparison between a file that was created before you upgraded and one that was created afterwards.
 

dhawk312

Dabbler
Joined
Jul 29, 2011
Messages
19
Here are two outputs running "ls -l" on two different directories. The first is my media directory with all of my recorded TV and videos. I also randomly moved a file to this directory to test if I could modify or delete it. This is the shockwave.exe. Short answer is I cannot delete it. The other directory is where I backup all my devices and store OSes and software.

[root@Server] /mnt/Server/Livingroom# ls -l
total 6734
dr-xr-xr-x+ 4 guest guest 5 Mar 6 18:05 ./
dr-xr-xr-x+ 13 guest guest 21 Mar 8 09:28 ../
drwxr-xr-x+ 2 guest guest 1175 Mar 9 08:22 Recorded TV/
-rw-r--r-- 1 guest guest 6674008 Mar 4 20:31 Shockwave_Installer_Slim.exe
drwxr-xr-x 4 guest guest 4 Apr 23 2011 Videos/


[root@Server] /mnt/Server/Software# ls -l
total 34
drwxr-xr-x+ 7 guest guest 7 Mar 8 20:21 ./
dr-xr-xr-x+ 13 guest guest 21 Mar 8 09:28 ../
drwxr-xr-x+ 4 guest guest 22 Jan 30 05:48 Driver Backup_21_Rev6/
drwxrwxrwx+ 4 guest guest 4 Mar 8 20:00 Operating Systems/
drwxrwxrwx+ 6 guest guest 11 Mar 8 20:00 Software/
drwxr-xr-x+ 2 guest guest 3 Mar 8 19:58 Windows 7/
drwxrwxrwx+ 2 guest guest 5 Mar 8 20:31 Windows 8
 

dhawk312

Dabbler
Joined
Jul 29, 2011
Messages
19
Actually, I got it working with your earlier comments. I ran "chmod -R 777 /mnt/Server" and then also ran a chmod & chown on each individual Z volume that didn't have the proper permissions. That fixed all of my issues. I can now create, modified, and delete files from all of my network connected devices.

Thanks!!!
 

dhawk312

Dabbler
Joined
Jul 29, 2011
Messages
19
Wait, one last question now. All of my directories now have drwxrwxrwx+ permissions, except my /Livingroom dir which houses all my recorded TV and movies. It has drwxrwxrwx permissions. What difference does the "+" at the end make?
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
The "+" means it has an access control list associated with it. Not sure why the LivingRoom does not have that. It looks from your earlier ls output that LivingRoom has it but the Videos directory within LivingRoom might not.

You can see the ACL using "ls -e".

Glad you got it working. I remember also just chmod-ing everything to 777. No sense overcomplicating the setup.
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
when I run "ls -e" I receive the following error:

ls: illegal option -- e
I got that off a google search. Clearly that is not true, or maybe for some dialect of UNIX, I dunno. The way to do it in FreeNAS (and I actually tried it this time!), is to use getfacl:

Code:
[durk@nanotube ~]$ ls -l
total 906
-r-xr-xr-x  1 durk  staff    1676 Oct  3 09:28 periodic
[durk@nanotube ~]$ getfacl periodic
# file: periodic
# owner: durk
# group: staff
            owner@:-w-p----------:------:deny
            owner@:r-x----A-W-Co-:------:allow
            group@:-w-p----------:------:deny
            group@:r-x-----------:------:allow
         everyone@:-w-p---A-W-Co-:------:deny
         everyone@:r-x---a-R-c--s:------:allow
[durk@nanotube ~]$
 

kdon

Cadet
Joined
Mar 31, 2012
Messages
8
Actually, I got it working with your earlier comments. I ran "chmod -R 777 /mnt/Server" and then also ran a chmod & chown on each individual Z volume that didn't have the proper permissions. That fixed all of my issues. I can now create, modified, and delete files from all of my network connected devices.

Thanks!!!

Hey sorry to post OT, but I am vaguely linux familiar, and cannot find where I can access the command line for the server through the GUI. Any help here? Thanks!!
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
It's not in the GUI.

where I can access the command line for the server through the GUI.

From the server itself, you can select the option to go to the "shell". Or, you can enable SSH (under "services" in the GUI). If you're using Windows, you can use the PuTTy client (http://www.chiark.greenend.org.uk/~sgtatham/putty/) to connect to the box. That's how I do it, since I run my server headless.
 

robinasu

Cadet
Joined
Apr 2, 2012
Messages
5
I recently upgraded to the newest stable release of FreeNas 8.0.4. I was previously running the first stable release of FreeNas 8.0. Since upgrading I cannot write to any of my shared CIFs folders. I followed the documentation walkthrough as well as the PDF provided here, but neither work for me. I believe the problem lies in my permissions. When I try to change any permissions it does not apply the changes. Instead, the webpage just stops and no changes are set. This occurs for changing the owner, group, read/write, and set recursively (which is unchecked).

Any ideas?

Thanks.

I have the same issue.. the permissions do not change and the GUI just sits there. Is there any resolution to this yet?
 

kdon

Cadet
Joined
Mar 31, 2012
Messages
8
I have the same issue.. the permissions do not change and the GUI just sits there. Is there any resolution to this yet?

Yes, I had to go into the shell and just say "chmod -R 777 /mnt/shared" to open everything up. Has worked perfectly since! If youre on 8.2, you can go into the shell easily through the GUI, which is what I did.
 

robinasu

Cadet
Joined
Apr 2, 2012
Messages
5
Thanks

Yes, I had to go into the shell and just say "chmod -R 777 /mnt/shared" to open everything up. Has worked perfectly since! If youre on 8.2, you can go into the shell easily through the GUI, which is what I did.

Hey, thanks for the reply. I am running 8.0.4-Release. Sounds like 8.2 has some nice features. Did you ever find out why the web GUI is unresponsive when trying to set permissions?
 

kdon

Cadet
Joined
Mar 31, 2012
Messages
8
Hey, thanks for the reply. I am running 8.0.4-Release. Sounds like 8.2 has some nice features. Did you ever find out why the web GUI is unresponsive when trying to set permissions?

No I have literally no idea! I am a Linux noobie so any troubleshooting I do is very basic haha. I'd reccomend upgrading to 8.2 beta2, as it is very stable (so far, besided plugins lolo), and the shell in GUI makes life SO easy!
 

valerio

Cadet
Joined
Apr 10, 2012
Messages
2
Definite Problem since 8.0.3

I have seen this permissions issue popup in version 8.0.3 to the point where I had to revert back to 8.02.

Using chmod 777 fixes the issue somewhat superficially, at least you can now create/modify/delete files/folders but something is still quite wrong since even with 777 my Windows 7 can't zip files in my FreeNAS 8.0.4 shares anymore (it states it can't create the zip there). I have no clue on what is going on in the latest builds but I will have to revert back to 8.0.2 once again now to make it all work fine.

I believe on one of my chat conversations, the devs indicated they upgraded samba in 8.0.3 and maybe that is what is causing these issues.
I wish they could find what it is and fix it since in 8.0.2 none of this was present.

Any clues anybody on this?

Valerio
 

valerio

Cadet
Joined
Apr 10, 2012
Messages
2
Problem Solved

After an afternoon of troubleshooting I believe I "may" have solved this issue.

I basically installed v8.0.4 anew and setup the configuration from scratch. Then I imported the volumes (Auto Import Volume), reset the permissions on each volume (Owner: guest, Group: guest, ACL: Windows, Mode: All checked but for Write on Group and Other; checked Set permission recursively) one by one, setup each Share manually again and now the permissions seem to work.

(Restoring a previous config backup did not solve this, I had to setup all the config from scratch.)

In fact, now in Windows 7 when check the permissions of a file or folder I don't get the error as before that stated the permissions order is incorrect.

I am not sure on what caused this and why all worked before v8.0.3, however this tedious procedure seems to have worked for me.

I hope this helps.
 
Status
Not open for further replies.
Top