Symlink doesn't work with user

sarobee
sarobee Posts: 3  Freshman Member
edited September 2019 in Personal Cloud Storage
Hi!
My problem is not easy but hopefully can solve somehow...
So, I  created a "main" folder on my NAS, which contains some symlinked folder. I would like to reach all folders under one network drive on my PC.
I set some users who should has reading and/or writing rights for one or more folders.  
If I map the "main" folder with admin rights it works properly, but if I would like to map the "main" folder or the folder - which is symlinked before - with a user who has read or write access rights, Windows say: access denied. I don't know why...
What have I done wrong?



#NAS_Sep_2019

All Replies

  • Mel
    Mel Posts: 83  Ally Member
    Can you share details steps and screenshots? I would like to check it on my NAS.
    Which ZYXEL NAS device you have? What is its firmware version?
  • sarobee
    sarobee Posts: 3  Freshman Member

    NAS: 326
    Firmware: V5.21(AAZF.3)

    I think I realized why the user has no access, but the problem not solved yet.

    The beginning:

    STEP 1. Created a „MAIN” folder /GUI interface/

    STEP 2. Created two folders SHARED_1 and SHARED_2 /GUI interface/

    STEP 3. created symlink to MAIN from SHARED_1 and SHARED_2 with ln -s command /PuTTY/

    STEP 4. Created two users USER_1 and USER_2 /GUI/

    STEP 5. Created „FULL” group and put USER_1 into the group with write access /GUI/

    STEP 6. Changed the SHARED_1 folder owner group to the „FULL” group with chgrp command /PuTTY/

    STEP 7. Changed the SHARED_1 folder rights to 770 with chmod command /PuTTY/

    This is the starting method which is working fine, I tried it. USER_1 has access all the 3 folders, but USER_2 has access only the MAIN and SHARED_2 folders.

    But I need a little bit different.
    I would like if the USER_1 has access to the SHARED_1 folder ONLY, and USER_2 has access to the SHARED_2 folder ONLY. Naturally they can have access to the MAIN folder.

    My idea: put both of the users into the FULL group and I set USER_1 for SHARED_2 folder to no access and USER_2 for SHARED_1 folder to no access it will working, but not working for me. They have full access to all folders. How can I solve it?






  • Mijzelf
    Mijzelf Posts: 2,790  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    In samba you'll have to explicitly enable the possibility to follow symlinks. Which is not trivial, as the smb.conf is generated dynamically by the firmware.
    How about a bindmount?
  • sarobee
    sarobee Posts: 3  Freshman Member
    Ok, it's solved. I got the solution and it is very simple and easy.
    The symlink part need for it.
    Than I created GROUP_1 and I put in USER_1 and admin, than created GROUP_2, put in USER_2 and admin.
    Changed the SHARED_1 folder owner group to GROUP_1, the same with SHARED_2
    Changed the folders rights to 770.
    And voila, admin has full access for MAIN, SHARED_1 and SHARED_2, USER_1 has full acces for SHARED_1 but no access SHARED_2 and the same with USER_2
    Anyway, thanks guys for your help!


Consumer Product Help Center