SSH, SFTP e permessi
Alberto Federico Turelli
alberto.turelli a atworkonline.it
Lun 24 Ott 2005 17:38:53 UTC
On Mon, 2005-10-24 at 18:29 +0200, marco ghidinelli wrote:
> On Mon, Oct 24, 2005 at 03:47:47PM +0200, Alberto Federico Turelli wrote:
> >
> > Ho un server su cui gira tomcat (con l'utente tomcat5). Tomcat deve
> > poter elaborare e spostare dei file caricati con il comando 'scp' da
> > remoto. I file vengono creati nella home di un utente di sistema, al
> > quale vorrei assegnare umask 002, e aggiungere tomcat5 al gruppo
> > dell'utente stesso.
>
> non puoi settare i permessi dei file prima?
Purtroppo no, non conosco a priori i nomi dei file che verranno
caricati.
Ho dovuto fare un
bibe a scratchy:~ $ echo umask 002 >> ~/.bashrc
bibe a scratchy:~ $ export umask >> ~/.bashrc
bibe a scratchy:~ $ mkdir upload
bibe a scratchy:~ $ chmod g+w upload
bibe a scratchy:~ $ ls -l
drwxrwxr-x 2 bibe bibe 4096 2005-10-24 19:32 upload
bibe a itchy:~ $ touch pippo
bibe a itchy:~ $ ls -l
-rw-r--r-- 1 bibe bibe 0 2005-10-24 19:34 pippo
bibe a itchy:~ $ scp pippo scratchy:~/upload/
pippo 100% 0 0.0KB/s
bibe a itchy:~ $ ssh scratchy ls -l upload/
-rw-rw-r-- 1 bibe bibe 0 2005-10-24 19:34 pippo
> io ho provato e funziona:
>
> $ touch aaaa
> $ ls -la aaaa
> -rw-r--r-- 1 marcogh marcogh 0 2005-10-24 18:26 aaaa
>
> $ chmod 700 aaaa
> $ ls -la aaaa
> -rwx------ 1 marcogh marcogh 0 2005-10-24 18:26 aaaa
>
> $ scp aaaa poirot:~
> aaaa 100% 0 0.0KB/s
> 00:00
> $ ssh poirot ls -la aaaa
> -rwx------ 1 marcogh tesireti 0 Oct 24 18:25 aaaa
non è esattamente quello che volevo, ma grazie.
E in bocca al lupo per mercoledì!!!
bibe
--
Alberto Federico Turelli <alberto.turelli a atworkonline.it>
atwork di Alberto Turelli
Maggiori informazioni sulla lista
Lug
|