Sponsor-Board.de

Normale Version: User anlegen
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Ich möchte den User: Michael der in der Gruppe: ftpuser
ist, auf einen Ordner rechte geben

/home/server/minecraft/jetminecraft

Dieser hat schon die Rechte um dort Sachen ändern zu können, leider kann er keine Sachen hochladen.

So sieht das ganze dann aus ..

Code:
drwxr-xr-x 8 root root 4.0K Jun 17 13:40 .
drwxr-xr-x 3 root root 4.0K Jun 17 14:02 ..
-rw-r--r-- 1 root root    0 Jun 17 12:55 banned-ips.txt
-rw-r--r-- 1 root root    0 Jun 17 12:55 banned-players.txt
-rw-r--r-- 1 root root 1.3K Jun 17 12:55 bukkit.yml
-rw-r--r-- 1 root root 2.6K Jun 17 12:55 help.yml
-rw-r--r-- 1 root root    0 Jun 17 12:55 ops.txt
-rw-r--r-- 1 root root    0 Jun 17 12:56 permissions.yml
drwxr-xr-x 2 root root 4.0K Jun 17 12:55 plugins
drwxr-xr-x 8 root root 4.0K Jun 17 16:58 serverdir
-rw-r--r-- 1 root root 2.1K Jun 17 13:30 server.log
-rw-r--r-- 1 root root  435 Jun 17 12:56 server.properties
drwxr-xr-x 2 root root 4.0K Jun 17 13:02 UDP client
-rw-r--r-- 1 root root    0 Jun 17 12:55 white-list.txt
drwxr-xr-x 5 root root 4.0K Jun 17 13:30 world
drwxr-xr-x 5 root root 4.0K Jun 17 13:30 world_nether
drwxr-xr-x 5 root root 4.0K Jun 17 13:30 world_the_end

Code:
#
# To have more informations about Proftpd configuration
# look at : http://www.proftpd.org/
#

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use.  It establishes a single server
# and a single anonymous login.  It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName            "ProFTPD"
#ServerType            standalone
ServerType            inetd
DefaultServer            on
<Global>
DefaultRoot    ~        psacln
AllowOverwrite        on
</Global>
DefaultTransferMode    binary
UseFtpUsers            on

TimesGMT            off
SetEnv TZ :/etc/localtime
# Port 21 is the standard FTP port.
Port                21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask                022

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances            30

#Following part of this config file were generate by PSA automatically
#Any changes in this part will be overwritten by next manipulation
#with Anonymous FTP feature in PSA control panel.

#Include directive should point to place where FTP Virtual Hosts configurations
#preserved

ScoreboardFile /var/run/proftpd_scoreboard

# Primary log file mest be outside of system logrotate province

TransferLog /opt/psa/var/log/xferlog

#Change default group for new files and directories in vhosts dir to psacln

<Directory /var/www/vhosts>
    GroupOwner    psacln
</Directory>
<Global>
    RequireValidShell off
</Global>
DefaultRoot ~ ftpuser
<Limit LOGIN>
    DenyGroup !ftpuser
</Limit>

# Enable PAM authentication
AuthPAM on
AuthPAMConfig proftpd

IdentLookups off
UseReverseDNS off

AuthGroupFile    /etc/group

Include /etc/proftpd.include

chown -R michael:ftpuser /home/server/minecraft/jetminecraft

Du solltest generell mal deine Vorgehensweise überdenken, wenn Ordner im Home Verzeichnis root gehören...
Ich weiß, mir wollte eigentlich jemand den Server einrichten war aber leider nicht das wahre vom ei.

Das ist zum Testen, werd demnächst alles überarbeiten.

Werde es nachher testen. Vielen dank!

powerAG schrieb:
Ich weiß, mir wollte eigentlich jemand den Server einrichten war aber leider nicht das wahre vom ei.

[Link: Registrierung erforderlich]

So weit,so gut.Aber wie sperre ich den User in seinem Verzeichnis /home/user ein?

Weiterhin würde ich gern Wissen,wie man den Zugang per sftp sperrt.


Zazama schrieb:
So habe ich es immer gemacht:

Code:
apt-get install proftpd     (Installiert ein FTP Programm)

addgroup ftpuser     (Muss nur einmal gemacht werden, es erstellt die Gruppe ftpuser)

adduser USERNAME     (Erstellt einen Benutzer)

passwd USERNAME     (Jetzt kann man das Passwort für den erstellten Benutzer eingeben)

adduser USERNAMEvonADDUSER ftpuser     (Fügt den Benutzer in die Gruppe ftpuser)


-> Adduser erstellt im /home/ Verzeichnis einen Ordner mit dem Namen des gewählten Usernamen.
Wenn man sich jetzt per FTP verbindet kann man nur auf diesen Ordner zugreifen.
Wenn der FTP Benutzer in einen anderen Ordner soll muss noch das Homeverzeichnis des angelegten Benutzers geändert werden.

Seiten: 1 2 3
Referenz-URLs