Jump to content

SUBIECTE NOI
« 1 / 5 »
RSS
Google tv si open vpn

Vot europarlamentare

Sfat reparatii

Jurnal de bord Tesla M3SR 2024 Hi...
 Acostament sosele comune Romania

AI-ul Google cartografiaza 1 mili...

De ce nu se fac profesori doar ol...

imprimanta laser capacitate medie...
 Parere garsoniera Tineretului

Sfaturi achizitie boxe hi-fi pent...

Baterie externa solara vs baterie...

Sapa peste pardosea veche
 recomandare placa captura video

Trecere apartament pe numele meu

Seria 3 - E90 / 91

LakeSide 11 Straulesti
 

Obținere drept de root pe Fedora 21

- - - - -
  • Please log in to reply
13 replies to this topic

#1
worm94

worm94

    Member

  • Grup: Members
  • Posts: 266
  • Înscris: 02.01.2015
Salut tutror,

Am o problema dacă ia-și putea spune așa. Tocmai mi-am instalat amppsînsa nu reușesc sa fac și nici să copii nici un fișier in directorul www pentru a-l putea rula.
Cred ca acest lucru se datoreaza faptului că nu am drept de root.(nu știu exact), cu toate ca atunci când am instalat Fedora am bifat sa am drept de super-user pe contul actual.
Din terminal știu cum să rezolv asta dar nu știu cum sa fac acest lucru pentru partea grafică(mai exact pentru clik ) :)). Sper că m-am facut înțeles cât de cât.
Multumesc!

#2
0x0c

0x0c

    Membru inferior

  • Grup: Senior Members
  • Posts: 2,799
  • Înscris: 28.07.2014
Poți schimba proprietarul folderului în cauză cu
su chown -R numele_tau_de_utilizator /var/www
și apoi ar trebui să te lase să copiezi și să faci fișiere acolo. Nu e recomandat să ai permisiuni root pe tot sistemul cu contul de utilizator normal.

Edited by 0x0c, 09 February 2015 - 20:04.


#3
shogun1

shogun1

    Cranky old n00b ☯

  • Grup: Senior Members
  • Posts: 7,542
  • Înscris: 31.01.2009
Sau poti deschide managerul de fisiere ca root, spune-ne ce interfata grafica folosesti. Comanda ar fi kdesudo dolphin pentru Kde, gksudo nautilus pentru Gnome, gksudo thunar pentru Xfce4, samd, la cerere pui parola ta (inteleg ca utilizazi sudo, nu?). Dai comanda in terminal sau in Run (Alt+F2).

@0x0c: comanda aia ar trebui sa fie:
su -c 'chown -R nume-user nume-director'

sau doar chown... logat ca root (su- Enter- parola root sau sudo su- Enter- parola cont user cu drept sudo).

Edited by shogun1, 11 February 2015 - 19:54.
Completari


#4
tflorin40

tflorin40

    Active Member

  • Grup: Members
  • Posts: 1,436
  • Înscris: 22.10.2007
Ce imi place mc-ul !
https://www.midnight-commander.org/
E la pachet in linux.

Edited by tflorin40, 09 February 2015 - 20:53.


#5
shogun1

shogun1

    Cranky old n00b ☯

  • Grup: Senior Members
  • Posts: 7,542
  • Înscris: 31.01.2009
Da, mc e intotdeauna o varianta.
http://stressat.blog...-commander.html

#6
worm94

worm94

    Member

  • Grup: Members
  • Posts: 266
  • Înscris: 02.01.2015
Nu am reusit sa ajung acasa sa incerc variantele voastre. Revin maine cu un rezultat. :)

#7
worm94

worm94

    Member

  • Grup: Members
  • Posts: 266
  • Înscris: 02.01.2015

View Post0x0c, on 09 februarie 2015 - 20:03, said:

Poți schimba proprietarul folderului în cauză cu
su chown -R numele_tau_de_utilizator /var/www
și apoi ar trebui să te lase să copiezi și să faci fișiere acolo. Nu e recomandat să ai permisiuni root pe tot sistemul cu contul de utilizator normal.


[worm@worm ~]$ su chown -R worm /var/www
su: invalid option -- 'R'

Usage:
su [options] [-] [<user> [<argument>...]]

Change the effective user ID and group ID to that of <user>.
A mere - implies -l.  If <user> is not given, root is assumed.

Options:
-m, -p, --preserve-environment  do not reset environment variables
-g, --group <group> specify the primary group
-G, --supp-group <group> specify a supplemental group

-, -l, --login   make the shell a login shell
-c, --command <command> pass a single command to the shell with -c
--session-command <command> pass a single command to the shell with -c
   and do not create a new session
-f, --fast   pass -f to the shell (for csh or tcsh)
-s, --shell <shell> run <shell> if /etc/shells allows it

-h, --help display this help and exit
-V, --version  output version information and exit

For more details see su(1).
[worm@worm ~]$ su
Password:
[root@worm worm]# su chown -R worm /var/www
su: invalid option -- 'R'

Usage:
su [options] [-] [<user> [<argument>...]]

Change the effective user ID and group ID to that of <user>.
A mere - implies -l.  If <user> is not given, root is assumed.

Options:
-m, -p, --preserve-environment  do not reset environment variables
-g, --group <group> specify the primary group
-G, --supp-group <group> specify a supplemental group

-, -l, --login   make the shell a login shell
-c, --command <command> pass a single command to the shell with -c
--session-command <command> pass a single command to the shell with -c
   and do not create a new session
-f, --fast   pass -f to the shell (for csh or tcsh)
-s, --shell <shell> run <shell> if /etc/shells allows it

-h, --help display this help and exit
-V, --version  output version information and exit

For more details see su(1).
[root@worm worm]# clear

[root@worm worm]# su chown -R worm /var/www
su: invalid option -- 'R'

Usage:
su [options] [-] [<user> [<argument>...]]

Change the effective user ID and group ID to that of <user>.
A mere - implies -l.  If <user> is not given, root is assumed.

Options:
-m, -p, --preserve-environment  do not reset environment variables
-g, --group <group> specify the primary group
-G, --supp-group <group> specify a supplemental group

-, -l, --login   make the shell a login shell
-c, --command <command> pass a single command to the shell with -c
--session-command <command> pass a single command to the shell with -c
   and do not create a new session
-f, --fast   pass -f to the shell (for csh or tcsh)
-s, --shell <shell> run <shell> if /etc/shells allows it

-h, --help display this help and exit
-V, --version  output version information and exit

For more details see su(1).


Nu prea mi-a mers așa. Posted Image

Aici
/var/www
Nu ar trebui sa fie calea către www.
Calea la mine începe cu usr
Imagine aici.

Edited by worm94, 11 February 2015 - 19:47.


#8
shogun1

shogun1

    Cranky old n00b ☯

  • Grup: Senior Members
  • Posts: 7,542
  • Înscris: 31.01.2009
su= substitute user= te loghezi ca alt utilizator, dacă nu specifici un user atunci root! Dacă te-ai logat ca root cu su și parolă de root dai comanda: chown -R worm /var/www, fără su în față.

Dacă vrei neapărat logare ca root pentru o singură comandă, dai ca user normal comanda (pui parola de root la cerere):
su -c 'chown -R worm /var/www'

Trebuie puse ghilimele ' sau "

LE: și pui calea corectă: su -c "chown -R worm /usr/local/ampps/www" ca user sau ca root chown -R worm /usr/local/ampps/www

Edited by shogun1, 11 February 2015 - 20:00.
Completări


#9
xxvirusxx

xxvirusxx

    Retired

  • Grup: Senior Members
  • Posts: 13,441
  • Înscris: 11.11.2005
Hmm..

Parca era asa:

sudo chown -R numele_tau_de_utilizator /var/www


#10
shogun1

shogun1

    Cranky old n00b ☯

  • Grup: Senior Members
  • Posts: 7,542
  • Înscris: 31.01.2009
@xxvirusxx: dacă are instalat/ configurat sudo, în majoritatea distribuțiilor contul root este activ, setată parola la instalare, șamd.

#11
0x0c

0x0c

    Membru inferior

  • Grup: Senior Members
  • Posts: 2,799
  • Înscris: 28.07.2014

View Postxxvirusxx, on 11 februarie 2015 - 19:47, said:

Hmm..

Parca era asa:

sudo chown -R numele_tau_de_utilizator /var/www
sudo merge pe Ubuntu. Am mai testat și alte distribuții de Linux mai demult și nu mergea. Știu că dădeam su, băgam parola și eram root. Nu știu care e echivalentul sudo pe alte distribuții Linux. Speram ca inițiatorul să își dea seama și să adapteze comanda, inclusiv cu calea către folderul www.

#12
xxvirusxx

xxvirusxx

    Retired

  • Grup: Senior Members
  • Posts: 13,441
  • Înscris: 11.11.2005
@shogun1

Pai si merge direct cu su -c 'chown -R worm /var/www'?

Eu foloseam sudo chown, sau ma logam pe root cu su, apoi foloseam chown

@0x0c

Pe altele trebuie sa instalezi sudo apoi sa adaugi userul in sudoers

Edited by xxvirusxx, 11 February 2015 - 20:10.


#13
shogun1

shogun1

    Cranky old n00b ☯

  • Grup: Senior Members
  • Posts: 7,542
  • Înscris: 31.01.2009

View Postxxvirusxx, on 11 februarie 2015 - 20:08, said:

@shogun1

Pai si merge direct cu su -c 'chown -R worm /var/www'?
Da, opțiunea -c face să te loghezi ca root doar pentru comanda pasată su, imediat după rămâi logat ca user. Dar dacă comanda e ”stufoasă” și are opțiuni sau parametri proprii trebuie încadrată de ghilimele (' sau ").

[ https://i.imgur.com/pgJDBkI.png - Pentru incarcare in pagina (embed) Click aici ]


LE: @worm94: citește te rog aici, ți-ar putea fi de folos pe viitor: http://stressat.blog...ri-de-root.html

Edited by shogun1, 11 February 2015 - 20:23.
Completări


#14
xxvirusxx

xxvirusxx

    Retired

  • Grup: Senior Members
  • Posts: 13,441
  • Înscris: 11.11.2005
Aha, ms.
Bun de retinut :)

Anunturi

Bun venit pe Forumul Softpedia!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Forumul Softpedia foloseste "cookies" pentru a imbunatati experienta utilizatorilor Accept
Pentru detalii si optiuni legate de cookies si datele personale, consultati Politica de utilizare cookies si Politica de confidentialitate