Forums

Resolved
0 votes
I'm experienced with zentyal which is great but now Samba windows acl permissions are not working properly, and I concluded that are not well deployed, and so I decided to give ClearOs a try, and as a matter of fact after all my testing everything is really smoth and works greatly, I had a great test with all windows Acl and they are working awesomely;
now I'm trying to migrate the old Iscsi Nas (9TB - medium sized company environment); I'm using this ext4 filesystem on the NAS with the old distribution and I never had problems so I suppose that the nas works properly.The Iscsi initiator worked perfectly and I mounted it on sda1, obviously, without formatting anything. The command read and write on the nas perfectly, after I configured it to mount in a random folder. But...

What I want to do is, I want to get the same shares i had on the old distribution, for migration suitability, which are:
#flexshare1 => folder "share1"
#flexshare2 => folder "share2"
...
All in the root of the NAS.

My fist attempt was to create the flexshare on the webgui, with the same name of the old share, then, mount the NAS on the /var/flexshare/shares directory, reboot; I expected to see the folder populated and perhaps give the same permissions Clearos gives on his shares (so flexshare user and allusers group); no way the system neither boot!

Second attempt, was to delete all the flexshares, and BEFORE, mount the nas; reboot, and then create new shares on the webgui, with the same name of the folder already present in the nas (folder "share1" I mentioned above); the answer from the webgui: "unexistant folder"!!

Third: full of hope, I found the /etc/clearos/flexshare.conf custom folder option, tried to add the random folder where I mount my nas, with the same name of the share, obviously, then the share is created but, another surprise, although the permissions are exactyl the same of usual flexshare, I can't access in the share in no way at all!! Windows answers "Unable to access, ask to the admin" error"

Fourth, I tried to mount the nas in another folder, then bind mount on the right folder (/var/flexshare/shares), and in this case the system boots, I can access the terminal and see the folder and the content on the right path (/var/flexshare/shares) but, surprise! The webgui doesn't start! I can't see the login page, "refused connection" error!

Fifth, I tried to bind on a subfolder (/var/flexshare/shares/test) the bind works and the system starts. But it's not what I want because I can't implement with the same share names I had on the old distribution.

So I think I've done all the attempts; I'm stuck. Don't know what to do then. Do you have any advice?

Thank you very much

Ale
Wednesday, April 29 2020, 10:21 PM
Share this post:
Responses (12)
  • Accepted Answer

    Thursday, April 30 2020, 01:59 PM - #Permalink
    Resolved
    0 votes
    No, iScsi doesn't work that way, just user password based.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 01:56 PM - #Permalink
    Resolved
    0 votes
    Alessandro Caruso wrote:
    Could it be I have to give some permissions to /dev/sda1?
    I don't think you can. The closest I know to get to that is to set up a folder and give it the same permissions as /var/flexshare/shares then bind mount the two folders.

    Does the NAS have its own permission system? I have no idea how that would work with ClearOS permissions at the same time. remember I have no experience of iSCSI.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 01:36 PM - #Permalink
    Resolved
    0 votes
    Sorry you are right, the group was correctly allusers, then I made a test using a custom group in which I put my user... It's not working in no way, it seems that the share is not working properly I enabled Guest = Yes in /samba/flexshare.conf but still, can't enter. It seems something related to the external device permissions... Could it be I have to give some permissions to /dev/sda1?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 12:28 PM - #Permalink
    Resolved
    0 votes
    The group is wrong. It should be allusers or the group you assigned to the flexshare .
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 11:44 AM - #Permalink
    Resolved
    0 votes
    Anyway the system seems to be instable, sometimes I have to boot two times because the first, ClearOs doesn't start properly...
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 11:27 AM - #Permalink
    Resolved
    0 votes
    This is my getfacl output for that folder:

    [root@center shares]# getfacl 002clearostest/ -t
    # file: 002clearostest/
    USER flexshares rwx
    GROUP empty_group rwx
    other ---
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 11:02 AM - #Permalink
    Resolved
    0 votes
    does the getfacl command return what you expect for the iSCSI mount?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 10:52 AM - #Permalink
    Resolved
    0 votes
    What do you mean Nick? ClearOS Samba is managing the ACL perfectly, I already tested with a test folder in /var/flexshare/shares, I can both use setfacl -m to add acl, and I can even add windows acl on windows, moreover even the unix ownerships work, so I think that ClearOs makes a great work with acl shares! The problem is with this folder from the NAS (iscsi connected), it's created I can access by FTP but not from windows share! Any glues?
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 10:18 AM - #Permalink
    Resolved
    0 votes
    Note the custom folder is a strange beast. You need a different custom folder for each share. Don't be tempted to reuse the same one.

    I wonder if the problem is because ClearOS does not normally use ACL's and I would not know how to make it ACL aware. It controls its permissions solely by group ownership
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 10:03 AM - #Permalink
    Resolved
    0 votes
    Small good update.
    I retried with custom flexshare.conf folder. So I put a random folder under the root of my nas and added the share on the webconfig. First time clearos protested because there were no folders, so I mkdir a folder with root terminal, and it was added. Owner and group were changed from root to flexshare and allusers. Reboot, first stime stuck on reboot with some mounting errors. Tried to reboot without touching nothing (by the way this is a xen vm), and as strange as it can seem, it booted, and the share was correctly visible to windows. But I couldn't enter!! Windows keeps saying I have any permissions to enter! so what's the good news? I tried to enable FTP, and tested, with the same identical user, I could connect and add a file to the share! In fact, I can see that file on the other server... So? This is a permissions matter... Could it be that the /etc/fstab needs some other parameter apart those:

    _netdev,user_xattr,acl,defaults 0 0

    By the way I noticed that clearos flexshare implements the custom folder with a bind on this /etc/fstab file.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 08:23 AM - #Permalink
    Resolved
    0 votes
    Thanks Nick, could you tell me which logs have I to check when the system doesn't start? I'm going to retry... Maybe a problem with iscsi mount...
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, April 30 2020, 07:25 AM - #Permalink
    Resolved
    0 votes
    That is really odd. I have no experience with an iSCSI disk, but with a normal disk, you should be able to mount your disk directly into /var/flexshare/shares, or bind mount your sda root into /var/flexshare shares (they are no different, in reality. Once mounted, Linux does not see a bind mount into a root folder and just sees it as a second mount point for the root folder). Normally, before you do this, you should stop samba (Windows networking) and any web servers (apart from the webconfig), then move the contents of /var/flexshare/shares to sda1/ before mounting or bind mounting. If bind mounting I'd suggest going one level deeper on sda1/ so the flexshares don't start in the root partition, but in a specific flexshare folder, then if you move your homes across or decide to use the disk for some other things, then it will be easier to see which folders are which.

    The documentation I found here for iSCSI looks simple OK but gets more complex if you go back a page.
    The reply is currently minimized Show
Your Reply