Obținere drept de root pe Fedora 21
#1
Posted 09 February 2015 - 19:55
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
Posted 09 February 2015 - 20:03
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
Posted 09 February 2015 - 20:19
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.
|
#4
Posted 09 February 2015 - 20:40
Ce imi place mc-ul !
https://www.midnight-commander.org/ E la pachet in linux. Edited by tflorin40, 09 February 2015 - 20:53. |
#5
Posted 09 February 2015 - 21:01
#6
Posted 10 February 2015 - 20:41
Nu am reusit sa ajung acasa sa incerc variantele voastre. Revin maine cu un rezultat.
|
#7
Posted 11 February 2015 - 19:43
0x0c, 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 [3;J [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. 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
Posted 11 February 2015 - 19:45
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.
|
#9
Posted 11 February 2015 - 19:47
Hmm..
Parca era asa: sudo chown -R numele_tau_de_utilizator /var/www |
#10
Posted 11 February 2015 - 19:57
@xxvirusxx: dacă are instalat/ configurat sudo, în majoritatea distribuțiilor contul root este activ, setată parola la instalare, șamd.
|
|
#11
Posted 11 February 2015 - 19:59
xxvirusxx, on 11 februarie 2015 - 19:47, said:
Hmm.. Parca era asa: sudo chown -R numele_tau_de_utilizator /var/www |
#12
Posted 11 February 2015 - 20:08
@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
Posted 11 February 2015 - 20:18
xxvirusxx, on 11 februarie 2015 - 20:08, said:
@shogun1 Pai si merge direct cu su -c 'chown -R worm /var/www'? [ 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.
|
Anunturi
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users