Weird FTP connection issues with NAS326

kolkritan
kolkritan Posts: 6  Freshman Member
edited October 2019 in Personal Cloud Storage
I'm trying to configure a NAS326 to work as an FTP server that I'll use for backup purposes. However, I'm having some issues with the FTP connection.

I have configured a user an Admin user, but when I use that user information to connect through FTP there are two issues.
1. The only folders I'm able to see and use are the preloaded shared folders (photo/music/video), not any additional shared folders I create no matter how I set the read/write accesses.
2. The read/write access I get when connecting through FTP is decided by what read/write access the "guest" account have to the different folders, not what read/write access the specific account I'm logging in with has.

Does anyone know of a solution to this?


#NAS_Oct_2019

All Replies

  • Batou
    Batou Posts: 101  Ally Member
    edited October 2019
    Do you mean that you created a new Administrator account, when used that account to login FTP, you cannot see additional shared folders?
    Does these shared folders has the access right for that Administrator account?
    Can you share the screenshots for the setting? And what is the model and firmware version?
  • kolkritan
    kolkritan Posts: 6  Freshman Member
    edited October 2019
    That is what I meant, yes. However, that issue seems to have resolved itself when I switched FTP client. The other issue, with the access I get when logging in using the administrator account being defined by the access rights given to the default "Guest" account ("pc-guest") still remains. That error is reproduced over several FTP clients as well as when connecting through a browser.

    Here are the settings for two example folders:



    And here are the access I get when signing on FTP with the user "kolkritan" (all other folders are set to give read/write access to all users):

    I have also tested that I do indeed have read/write access to the folder "Test", which I do.

    (It's not possible for me to try if the behavior is the same for the built in admin account at the moment, I will test that as soon as possible.)

    Model is NAS326 running V5.21(AAZF.3)
  • kolkritan
    kolkritan Posts: 6  Freshman Member
    No one has any ideas?
  • Godzilla
    Godzilla Posts: 8  Freshman Member
    It's not very aware of your problem for me.
    Is there any steps or more information to understand this problem?

    Do you mean: admin user: kolkritan still can access "Test" folder via FTP, when "Test" folder has defined admin user: kolkritan no access right for this folder.
  • kolkritan
    kolkritan Posts: 6  Freshman Member
    @Godzilla
    Correct.

    In addition, admin user: kolkritan CANNOT access "video" folder via FTP, when "video" folder has defined admin user: kolkritan with access right for that folder.

    I have done additional testing, and admin user: kolkritan follows the access rights given to the guest user: pc-guest account. 
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    Maybe it's nice to know how the access restrictions for FTP are implemented. In the filesystem is a directory /home/shares/, that's on a ramdrive. When you login over FTP, a directory /home/shares/<some number>/ is created, where <some number> is the PID of the FTP process spawned for this connection. Inside this directory there is a directory for each share the user has access to, and the actual share is bindmounted on this directory. The FTP root is /home/shares/<some number>/, and so the user can only see the shares he has access to.

    I don't know exactly how this is done. FTP uses PAM to perform the login, so the (ZyXEL specific) PAM module could create and mount the directories, but AFAIK PAM doesn't hear when the user logs off, yet the directories are cleaned up. Maybe something is keeping an eye on the running processes.

    It doesn't seem to be possible to create a ro bindmount to a rw directory, and I think for that reason ro shares are not visible in FTP.
  • kolkritan
    kolkritan Posts: 6  Freshman Member
    How do I find the /home/shares/ directory? I cannot see any "home" or "share" directory either when connecting through my FTP client, or when having my FTP client connected and then looking through the filesystem and shared folders on the web interface.
  • Mijzelf
    Mijzelf Posts: 2,763  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    /home/shares/ is in the internal filesystem, which you can see when you login over ssh.

Consumer Product Help Center