Pagina 2 di 2
Re: Problema di permessi
Inviato: ven 26 ago 2016, 22:34
da ponce
perche' probabilmente non ha il permesso di navigare in qualcuna delle directory intermedie prima di arrivare a /var/www/vhosts/test.com/httpdocs/demo_test ?
per accedere a demo_test c'e' bisogno che le directory intermedie abbiano tutte almeno il permesso di esecuzione per "other".
e' per verificare questo che ti avevo chiesto (inutilmente)
ponce ha scritto:se vuoi raffrontare col tuo caso riporta l'output di "ls -la" per le tue directory e i tuoi symlink, anche quello delle directory intermedie per arrivare a quelle che hai impostato.
Re: Problema di permessi
Inviato: sab 27 ago 2016, 8:55
da darkstaring
In pratica ho dato i permessi a other di alle varie directory, una per una, fino ad arrivare alla directory che mi serve:
Codice: Seleziona tutto
/var drwxr-xrwx.
/www drwxr-xrwx
/vhost drwxr-xrwx
/test.com drwxrw-rwx
/httpdocs drwxrw-rwx
/demo_test drwxrw-rwx
Ho usato il comando
e così via
Ma ancora in sftp non entro..
E con il tuo sftp_config non riesco ad entrare neanche con la configurazione standard, ovvero
creando l'utente con
useradd -p $(openssl passwd -1 test) test -s /bin/MySecureShell -m
Rimettendo apposto il file origina invece entro (negli utenti con home in /home);
Questo è il file originale:
Codice: Seleziona tutto
## MySecureShell Configuration File ##
#Default rules for everybody
<Default>
GlobalDownload 50k #total speed download for all clients
# o -> bytes k -> kilo bytes m -> mega bytes
GlobalUpload 0 #total speed download for all clients (0 for unlimited)
Download 5k #limit speed download for each connection
Upload 0 #unlimit speed upload for each connection
StayAtHome true #limit client to his home
VirtualChroot true #fake a chroot to the home account
LimitConnection 10 #max connection for the server sftp
LimitConnectionByUser 1 #max connection for the account
LimitConnectionByIP 2 #max connection by ip for the account
Home /home/$USER #overrite home of the user but if you want you can use
# environment variable (ie: Home /home/$USER)
IdleTimeOut 5m #(in second) deconnect client is idle too long time
ResolveIP true #resolve ip to dns
# IgnoreHidden true #treat all hidden files as if they don't exist
# DirFakeUser true #Hide real file/directory owner (just change displayed permissions)
# DirFakeGroup true #Hide real file/directory group (just change displayed permissions)
# DirFakeMode 0400 #Hide real file/directory rights (just change displayed permissions)
#Add execution right for directory if read right is set
HideNoAccess true #Hide file/directory which user has no access
# MaxOpenFilesForUser 20 #limit user to open x files on same time
# MaxWriteFilesForUser 10 #limit user to x upload on same time
# MaxReadFilesForUser 10 #limit user to x download on same time
DefaultRights 0640 0750 #Set default rights for new file and new directory
# MinimumRights 0400 0700 #Set minimum rights for files and dirs
ShowLinksAsLinks false #show links as their destinations
# ConnectionMaxLife 1d #limits connection lifetime to 1 day
# Charset "ISO-8859-15" #set charset of computer
</Default>
Re: Problema di permessi
Inviato: sab 27 ago 2016, 9:21
da darkstaring
Funziona

...
Ho commentato la linea
Home /home/$USER
Ora funziona sia l'utente in /home che quello in /var/www/ecc
Grazie 1000

Re: Problema di permessi
Inviato: sab 27 ago 2016, 10:08
da darkstaring
Con filezilla quando mi collego ottengo l'errore:
Codice: Seleziona tutto
Error: Received unexpected end-of-file from SFTP server
Error: Could not connect to server
E non posso modificare i files....
Sapete come posso risolvere?
Re: Problema di permessi
Inviato: sab 27 ago 2016, 10:20
da darkstaring
Con il tuo config di sftp_config, commentando la linea Home... Funziona bene
Questo è il file
Codice: Seleziona tutto
<Default>
GlobalDownload 50m #total speed download for all clients
# o -> bytes k -> kilo bytes m -> mega bytes
GlobalUpload 0 #total speed download for all clients (0 for unlimited)
Download 50m #limit speed download for each connection
Upload 0 #unlimit speed upload for each connection
StayAtHome true #limit client to his home
VirtualChroot true #fake a chroot to the home account
LimitConnection 20 #max connection for the server sftp
LimitConnectionByUser 10 #max connection for the account
LimitConnectionByIP 10 #max connection by ip for the account
Home /web #overrite home of the user but if you want you can use
# environment variable (ie: Home /home/$USER)
IdleTimeOut 3600 #(in second) deconnect client is idle too long time
ResolveIP false #resolve ip to dns
HideNoAccess false #Hide file/directory which user has no access
DefaultRights 0664 0775 #Set default rights for new file and new directory
ShowLinksAsLinks false #show links as their destinations
</Default>