Results 1 to 9 of 9

Thread: Share multiple folders with multiple ftp users.

  1. #1

    Question Share multiple folders with multiple ftp users.

    Hello There,
    I have installed OpenSUSE server 12.1 and I have created sftp server I want to know how i can create a user for this ftp with the same directory, for example, the home directory for the user tes1, test2.test3 with different permissions .....

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,156

    Default Re: Share multiple folders with multiple ftp users.

    Hello and welcome here.

    That said, your post is a bit confusing.

    There is not such a things as "OpenSUSE server 12.1".

    You may mean: SUSE Linux Enterprise Server (SLES) 12 with Service Pack 1. In which case you are on the wrong forums. The SLES/SLED forums are on https://forums.suse.com/forum.php

    Another possibility is that you have an openSUSE 12.1 system where you have configured some server functions on. But openSUSE version 12.1 is very old and long out of support. It will be difficult for people here to help on a version which they themselves do not run anymore for already a long time.

    So please first confirm what you are running. BTW if you are in doubt:
    Code:
    cat /etc/SuSE-release
    Henk van Velden

  3. #3
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,559

    Question Re: Share multiple folders with multiple ftp users.

    Looking back through the openSUSE history, version 12.1 was the one which moved away from "SysV init" to "systemd"; therefore we can talk about the relevant "systemd" commands.

    1. Do you have the appropriate systemd services enabled? For example:
    Code:
     > systemctl list-unit-files | grep -iE 'ssh|ftp'
    sshd.service                            enabled
    tftp.service                            static
    vsftpd.service                          disabled
    vsftpd@.service                         static
    tftp.socket                             disabled
    vsftpd.socket                           disabled
     >
    2. Is the OpenSSH Daemon running and enabled?
    Code:
     > systemctl status sshd.service
    * sshd.service - OpenSSH Daemon
       Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disabled)
       Active: active (running) since Wed 2018-02-21 09:24:04 CET; 1h 33min ago
      Process: 1862 ExecStartPre=/usr/sbin/sshd -t $SSHD_OPTS (code=exited, status=0/SUCCESS)
      Process: 1808 ExecStartPre=/usr/sbin/sshd-gen-keys-start (code=exited, status=0/SUCCESS)
     Main PID: 1901 (sshd)
        Tasks: 1
       CGroup: /system.slice/sshd.service
               `-1901 /usr/sbin/sshd -D
    
     >
    If, that's all OK then, we can begin with things such as "/etc/ssh/sshd_config": the default configuration is usually OK for most cases but, you should check if everything is OK for your case.

    You don't mention if you expect SSH and SFTP to be able to support anonymous FTP -- AFAICS they do not.

    Take a look at the 'sshd' man page and especially the section "LOGIN PROCESS": if any user has a "~/.ssh/rc" file defined then, for each login via SSH (SFTP) those commands will be executed and therefore also command such as "cd …".

    Therefore, for each user targeted by a remote SFTP session, an individual environment (read directory structure) can be defined.

    You may also want to consider defining a new user group specifically to handle the SFTP traffic to the server -- there is absolutely no rule which says that ** all ** (human) users shall be members of the group "users" …
    • There is also absolutely no rule which says that, all (human) users shall have a default login directory ("Home") directly located beneath the "/home/" directory.


    For more information about "standard" Linux system specifications, please refer to the "Linux Standard Base": <https://refspecs.linuxfoundation.org/lsb.shtml>.

  4. #4
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,559

    Default Re: Share multiple folders with multiple ftp users.

    Code:
     > cat /etc/SuSE-release
    openSUSE 42.3 (x86_64)
    VERSION = 42.3
    CODENAME = Malachite
    # /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
     > 
     > cat /etc/os-release
    NAME="openSUSE Leap"
    VERSION="42.3"
    ID=opensuse
    ID_LIKE="suse"
    VERSION_ID="42.3"
    PRETTY_NAME="openSUSE Leap 42.3"
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/o:opensuse:leap:42.3"
    BUG_REPORT_URL="https://bugs.opensuse.org"
    HOME_URL="https://www.opensuse.org/"
     >

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,156

    Default Re: Share multiple folders with multiple ftp users.

    Quote Originally Posted by dcurtisfra View Post
    Code:
     > cat /etc/SuSE-release
    openSUSE 42.3 (x86_64)
    VERSION = 42.3
    CODENAME = Malachite
    # /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
     > 
     > cat /etc/os-release
    NAME="openSUSE Leap"
    VERSION="42.3"
    ID=opensuse
    ID_LIKE="suse"
    VERSION_ID="42.3"
    PRETTY_NAME="openSUSE Leap 42.3"
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/o:opensuse:leap:42.3"
    BUG_REPORT_URL="https://bugs.opensuse.org"
    HOME_URL="https://www.opensuse.org/"
     >
    I think I understand what you want to say with this, but
    1. as you see it is still there in 42.3, let alone in 12.1;
    2. I am not 1000% sure /etc/os-release did already exist in openSUSE 12.1 and/or SLES 12 SP 1;
    3. I am very sure that this will work on the OP's system (except when it is not even anything SUSE).

    Thus I hope he will inform us about his real situation before people start to help him based on assumptions.
    Henk van Velden

  6. #6
    Join Date
    Apr 2011
    Location
    Northamptonshire, UK
    Posts
    37

    Default Re: Share multiple folders with multiple ftp users.

    If you want something more powerful/flexible than 'traditional' *nix file permissions, try ACLs. https://doc.opensuse.org/documentati...rity.acls.html

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,293
    Blog Entries
    2

    Default Re: Share multiple folders with multiple ftp users.

    When you install an FTP Server on your system, a great many documentation files are installed, and it's almost guaranteed that at least one of them will describe a blueprint for what you want to do.

    A few basic concepts to know before you thumb through the documentation...

    - A typical FTP install (but not openSUSE) clearly separates FTP Users from System Users, and this will likely be what you want. openSUSE merges the two security groups which makes it a bit easier to set up a personal FTP so that system Users are automatically available and set up as FTP Users, but by doing so, the configuration is not very flexible.

    - You <might> be able to modify the existing "personal FTP Server" settings by creating or modifying User Groups, but I haven't looked into that deeply. I'd generally instead opt for setting up your FTP Server the "usual, non-openSUSE way."

    - Documentation and how to undo what openSUSE sets up is specific to the FTP Server installed. Each time, I generally install mlocate and then run the locate app to find the documentation. Otherwise, nowadays I'm sure that the documentation is also posted online somewhere.

    - You can search this Forum for previous posts about how to set this up. Yours is not the first time this question has been asked although perhaps in different words. IIRC the last time this was asked, it was specific to vsftpd.

    And,
    You do need to properly identify your system, if it's SUSE then your re-configuration procedure will be <very> different than if you're on openSUSE.

    So,
    If you need additional help...
    You'll need to post the name of your FTP Server.
    And, your system (as suggested above, the result of cat /etc/os-release which AFAIK has been available since at least 13.1)

    HTH,
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  8. #8

    Default Re: Share multiple folders with multiple ftp users.

    Hello , there i have installed vsftpd on opensuse NAME=openSUSEVERSION="12.3 (Dartmouth)"
    VERSION_ID="12.3"
    PRETTY_NAME="openSUSE 12.3 (Dartmouth) (x86_64)"
    ID=opensuse
    ANSI_COLOR="0;32"
    CPE_NAME="cpe:/opensusepensuse:12.3"-

    SLEFTP:~ # systemctl status vsftpd.service
    vsftpd.service - Vsftpd ftp daemon
    Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled)
    Active: active (running) since Wed, 2018-03-07 10:40:52 CET; 29min ago
    Main PID: 1482 (vsftpd)
    CGroup: name=systemd:/system/vsftpd.service
    ├ 1482 /usr/sbin/vsftpd /etc/vsftpd.conf
    ├ 1696 /usr/sbin/vsftpd /etc/vsftpd.conf
    ├ 1698 /usr/sbin/vsftpd /etc/vsftpd.conf
    └ 1699 /usr/sbin/vsftpd /etc/vsftpd.conf


    Mar 07 10:40:52 SLEFTP.ftp.local systemd[1]: Starting Vsftpd ftp daemon...
    Mar 07 10:40:52 SLEFTP.ftp.local systemd[1]: Started Vsftpd ftp daemon.
    SLEFTP:~ #






    it works but when I tried to use encryption I have this response from the server : Error: The data connection could not be established: ECONNREFUSED - Connection refused by server

  9. #9
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,559

    Question Re: Share multiple folders with multiple ftp users.

    Newer versions of openSUSE, such as Leap 42.3 use vsftpd by default -- the documentation is here: <https://doc.opensuse.org/documentati...e/cha.ftp.html>.
    There's also an SDB article here: <https://en.opensuse.org/SDB:FTP_server>.
    The ArchLinux Wiki is here: <https://wiki.archlinux.org/index.php...ure_FTP_Daemon>.

    Are you sure that, the client system is attempting to establish the secure ftp connection with 'sftp' (ftp via SSH) and, that all the needed SSH certificates are in place?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •