comment bloquer les accès a d'autre dossier ?(home)

yannou44488

Membre
Inscription
29 Janvier 2013
Messages
1 377
Réactions
101
Points
7 263
bonjour en faire j'ai un vps mais je cherche comment bloquer par exemple l'uilisateur paul pour qu'il est que accès a son fichier (Dev) et pas au autre fichier comme par exemple revenir dans le dossier home merci de votre réponse
 

Spixz

This Is Us
Premium
Inscription
11 Décembre 2011
Messages
3 197
Réactions
847
Points
20 453
Slt, tu peux le faire avec ProFTPD :
2- Restrict access for some users
Some of you wish, for different reasons, to create more than one user and give a different access depending on the user.
For example if i create 2 users, one called user1 and the second called user2 and then want to deny access to the download directory for user2, You can do it as following :

First create the 2 users like userftp in the guide and give them alias names if you use aliases. Then allow your 2 users in the general LIMIT LOGIN section :
Code:
#VALID LOGINS
<Limit LOGIN>
AllowUser user1
AllowUser user2
DenyALL
</Limit>
Once done here is how to modify the directory sections to chose who is able to use which directory :
Code:
<Directory /home/FTP-shared/download/*>
Umask 022 022
AllowOverwrite off

<Limit ALL>
Order Allow,Deny
AllowUser user1
Deny ALL
</Limit>


<Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>
DenyAll
</Limit>
</Directory>

<Directory> /home/FTP-shared/upload/>
Umask 022 022
AllowOverwrite on

<Limit ALL>
Order Allow,Deny
AllowUser user1
AllowUser user2
Deny ALL
</Limit>


<Limit READ RMD DELE>
DenyAll
</Limit>

<Limit STOR CWD MKD>
AllowAll
</Limit>
</Directory>
Note - user2 will see the download directory but will not be able to enter the directory.

That's all

source :

Une réponse sur un forum :
 
Haut