Nitawezaje ku-edit vitu kwenye "var/www" Folder ?

Agape Kama G

Member
Feb 19, 2013
59
9
Nifanya nini ili niwe naweza "Kucopy into" au "Kuedit" content za "/var/www" Folder Kwenye Ubuntu 14.04 ?

You need to change user permission to that location and/or own the location using chmod and chown respectively.

Permission:
sudo chmod -R g+rw /var/www

Owning:
sudo chown -R <user>:<group> /var/www (without "<" na ">"), approach nyingine to hii ni kuangalia which group has read/write permission to /var/www (which is definitely root) and add your user to that group.

Kuna njia nyingine to achieve the same results na unaweza kusoma zaidi kuhusu chmod na chown kwa kutumia the man command on your terminal.
man chmod na man chown

Other brute way to do it ni kuandika or copy as root every time you want to deal with that location, I do not recommend this way, ni nzuri kama unacopy or writing just once or a few times but usually that location utaandika na kucopy sana and the first two ways are better

Nadhani Pia parmission issues zinaweza ku-exist kama utataka kuchange contents kwenye WWW bila kuzingatia Which is the default Apache web root.

Kama nakumbuka vizuri mara ya mwisho nadili na Linux server Web root ya 14.04 LTS na 12.04 LTS zilikuwa tofauti. kwenye 14 ilikuwa var/www/html na kwenye 12 ilikuwa ni var/www .

Xo nahisi kuwa unakosea kutumia www kama webroot kwenye 14. au kama unataka kuaccess kwenye www badala ya HTML basi you have to fix parmission kwa njia ulizoshauriwa hapo juu.
 
Nifanya nini ili niwe niweze "Kucopy into" au "Kuedit" content za "/var/www" Folder Kwenye Ubuntu 14.04????

You need to change user permission to that location and/or own the location using chmod and chown respectively.

Permission:
sudo chmod -R g+rw /var/www

Owning:
sudo chown -R <user>:<group> /var/www (without "<" na ">"), approach nyingine to hii ni kuangalia which group has read/write permission to /var/www (which is definitely root) and add your user to that group.

Kuna njia nyingine to achieve the same results na unaweza kusoma zaidi kuhusu chmod na chown kwa kutumia the man command on your terminal.
man chmod na man chown

Other brute way to do it ni kuandika or copy as root every time you want to deal with that location, I do not recommend this way, ni nzuri kama unacopy or writing just once or a few times but usually that location utaandika na kucopy sana and the first two ways are better
 
Nifanya nini ili niwe naweza "Kucopy into" au "Kuedit" content za "/var/www" Folder Kwenye Ubuntu 14.04????

Mkuu hapa sijaelewa...

My experience ukisha Install apache2 You can FTP any file to /var/www

And if you wish ku edit contents You can edit with nano or vi or any other command

Preferably sitakagi kuumiza kichwa changu kwenye terminal nahisi pana nichanganya nachofanya na Download e.g Index.php or any file in that directoly kisha na edit kwa PC mara nyingi natumia notepad++ kisha nali FTP back to its directory.

Provided hizo login details kwa hiyo server ziwe na administrative permissions ?
attachment.php

 

Attachments

  • sftp.PNG
    sftp.PNG
    30.3 KB · Views: 116
Hayo unayafanya ndani ya Ubuntu ?@njunwa wamavoko.

Inawezekana hiyo approach yako ni alternative ya kutumia Terminal Commands kama alivyo elekeza ub16 Maana mimi nilifanya kikawaida tu kama kwenye Windows nikaona inakataa kuedit na ku copy contents kwenye "/var/www" folder.
 
You need to change user permission to that location and/or own the location using chmod and chown respectively.

Permission:
sudo chmod -R g+rw /var/www

Owning:
sudo chown -R <user>:<group> /var/www (without "<" na ">"), approach nyingine to hii ni kuangalia which group has read/write permission to /var/www (which is definitely root) and add your user to that group.

Kuna njia nyingine to achieve the same results na unaweza kusoma zaidi kuhusu chmod na chown kwa kutumia the man command on your terminal.
man chmod na man chown

Other brute way to do it ni kuandika or copy as root every time you want to deal with that location, I do not recommend this way, ni nzuri kama unacopy or writing just once or a few times but usually that location utaandika na kucopy sana and the first two ways are better

Thanks in advance.
 
Hayo unayafanya ndani ya Ubuntu??????@njunwa wamavoko

Inawezekana hiyo approach yako ni alternative ya kutumia Terminal Commands kama alivyo elekeza ub16 Maana mimi nilifanya kikawaida tu kama kwenye Windows nikaona inakataa kuedit na ku copy contents kwenye "/var/www" folder
Ndio mkubwa nayafanya ndani ya VPS,ubuntu os installed.... terminal naona inazinguaga mm...
Siwezi edit file lolote kwa command nadownload file kwa ftp client nali edit kwa pc

Kwani yako ni Home/office server au ni zile za kununua mtandaoni?
 
Nadhani Pia parmission issues zinaweza ku-exist kama utataka kuchange contents kwenye WWW bila kuzingatia Which is the default Apache web root.

Kama nakumbuka vizuri mara ya mwisho nadili na Linux server Web root ya 14.04 LTS na 12.04 LTS zilikuwa tofauti. kwenye 14 ilikuwa var/www/html na kwenye 12 ilikuwa ni var/www .

Xo nahisi kuwa unakosea kutumia www kama webroot kwenye 14. au kama unataka kuaccess kwenye www badala ya HTML basi you have to fix parmission kwa njia ulizoshauriwa hapo juu.
 
Back
Top Bottom