Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] cp da script e permessi su un file
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
LAj
Apprentice
Apprentice


Joined: 22 May 2004
Posts: 294
Location: Avellino[Italy]

PostPosted: Tue Oct 17, 2006 11:32 pm    Post subject: [SOLVED] cp da script e permessi su un file Reply with quote

Una cosa semplice all'apparenza
ma forse a quest'ora mi sfugge qualcosa.

Spiegatemi questo:
ho creato uno script per copiare i file di un utente nelle mie cartelle root!
il mio script è eseguito da root che ne è il proprietario
e sui file ci sono i permessi in lettura,
PERCHE' lo script in esecuzione non ha il permesso di lettura???

Scusate, forse domani capirò :D
Notte.
_________________
They produce notes of any size as their own properties askng interests also.This is seignorage and goes to privates banks(FED, BCE).You don't have to pay to use $$,you can simply use your notes recovering monetary sovereignty.Public debt is not right!


Last edited by LAj on Wed Oct 18, 2006 9:20 am; edited 2 times in total
Back to top
View user's profile Send private message
lavish
Bodhisattva
Bodhisattva


Joined: 13 Sep 2004
Posts: 4296

PostPosted: Wed Oct 18, 2006 5:43 am    Post subject: Reply with quote

Uh? Non ho mica capito cosa significa "PERCHE' lo script in esecuzione non ha il permesso di lettura???"
Puoi spiegarti meglio per favore?
_________________
minimalblue.com | secgroup.github.io/
Back to top
View user's profile Send private message
LAj
Apprentice
Apprentice


Joined: 22 May 2004
Posts: 294
Location: Avellino[Italy]

PostPosted: Wed Oct 18, 2006 7:52 am    Post subject: Reply with quote

Ciao, ( grazie)
in effetti:
Code:
NeXT ~ # declare PREF="~oriana/"
NeXT ~ # declare UNA=".e/e/applications/menu/favorite/.order"
NeXT ~ # cp ~oriana/.e/e/applications/menu/favorite/.order .e/e/applications/menu/favorite/.order
NeXT ~ # echo -l FUNZIONA
NeXT ~ # cp $PREF$UNA $UNA
cp: impossibile fare stat di `~oriana/.e/e/applications/menu/favorite/.order': No such file or directory
NeXT ~ # echo -l "PERCHE NON FUNZIONA PUR ESSENDO ESPANSO ALLO STESSO MODO?"


Bho 8O
Illuminami!
_________________
They produce notes of any size as their own properties askng interests also.This is seignorage and goes to privates banks(FED, BCE).You don't have to pay to use $$,you can simply use your notes recovering monetary sovereignty.Public debt is not right!
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Wed Oct 18, 2006 8:09 am    Post subject: Reply with quote

LAj wrote:
Ciao, ( grazie)
in effetti:
Code:
NeXT ~ # declare PREF="~oriana/"
NeXT ~ # declare UNA=".e/e/applications/menu/favorite/.order"
NeXT ~ # cp ~oriana/.e/e/applications/menu/favorite/.order .e/e/applications/menu/favorite/.order
NeXT ~ # echo -l FUNZIONA
NeXT ~ # cp $PREF$UNA $UNA
cp: impossibile fare stat di `~oriana/.e/e/applications/menu/favorite/.order': No such file or directory
NeXT ~ # echo -l "PERCHE NON FUNZIONA PUR ESSENDO ESPANSO ALLO STESSO MODO?"



eh?

Non capisco se hai scritto in questo modo per qualche ragione particolare o meno, comunque, visto che mi perdo nel leggerlo, prova a fare:
Code:
echo "cp $PREF$UNA $UNA"

per vedere cosa é stato efettivamente espanso ed eventualmente provare a dare lo stesso comando con copia ed incolla.
_________________
Ciao da me!
Back to top
View user's profile Send private message
LAj
Apprentice
Apprentice


Joined: 22 May 2004
Posts: 294
Location: Avellino[Italy]

PostPosted: Wed Oct 18, 2006 8:37 am    Post subject: Reply with quote

ho solo messo i commenti nell' echo e omesso l'output di questo comando
ma per tutti gli altri questo è quanto compare sul terminale
cioè:

cp ~oriana/.e/e/applications/menu/favorite/.order .e/e/applications/menu/favorite/.order

non produce output ed infatti funziona
mentre invece

cp $PREF$UNA $UNA ; produce come output:
cp: impossibile fare stat di `~oriana/.e/e/applications/menu/favorite/.order': No such file or directory

quindi cerca di fare stat di esattamente lo stesso file.
Cmq:
Code:
NeXT ~ # echo "cp $PREF$UNA $UNA"
cp ~oriana/.e/e/applications/menu/favorite/.order .e/e/applications/menu/favorite/.order

_________________
They produce notes of any size as their own properties askng interests also.This is seignorage and goes to privates banks(FED, BCE).You don't have to pay to use $$,you can simply use your notes recovering monetary sovereignty.Public debt is not right!
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Wed Oct 18, 2006 8:53 am    Post subject: Reply with quote

LAj wrote:
non produce output ed infatti funziona


Il problema potrebbe essere nella tilde. Prova ad espanderla manualmente.
_________________
Ciao da me!
Back to top
View user's profile Send private message
LAj
Apprentice
Apprentice


Joined: 22 May 2004
Posts: 294
Location: Avellino[Italy]

PostPosted: Wed Oct 18, 2006 8:56 am    Post subject: Reply with quote

Funziona.
Ma perchè questa cosa?
_________________
They produce notes of any size as their own properties askng interests also.This is seignorage and goes to privates banks(FED, BCE).You don't have to pay to use $$,you can simply use your notes recovering monetary sovereignty.Public debt is not right!
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Wed Oct 18, 2006 9:17 am    Post subject: Reply with quote

LAj wrote:
Funziona.
Ma perchè questa cosa?


La tilde non é qualcosa che viene "capito" dal filesystem, é una convenzione che viene espansa dalla shell.

Allora, se bash si ritrova una linea da espandere evidentemente prima espante le tilde e poi le variabili. Allora se una variabile contiene una tilde questa non sarà espansa.

I vari dettagli sull'ordine di espansione e di interpretazione dovrebbero essere elencati nella man page di bash.

P.S. Hai fatto bene a mettere il tag [risolto], ma la sintesi della soluzione é un pò ecessiva... puoi eliminarla? ;-)
_________________
Ciao da me!
Back to top
View user's profile Send private message
LAj
Apprentice
Apprentice


Joined: 22 May 2004
Posts: 294
Location: Avellino[Italy]

PostPosted: Wed Oct 18, 2006 9:20 am    Post subject: Reply with quote

E per ricordarmene
_________________
They produce notes of any size as their own properties askng interests also.This is seignorage and goes to privates banks(FED, BCE).You don't have to pay to use $$,you can simply use your notes recovering monetary sovereignty.Public debt is not right!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum