Birmingham mumbai


Changing the ownership of objects



Download 15,21 Mb.
Pdf ko'rish
bet111/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   107   108   109   110   111   112   113   114   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

Changing the ownership of objects
Finally, we'll need to 
know how to change the ownership of files and directories. It's 
often the case that a particular user needs to gain access to an object, or perhaps we 
need to change the owning group as well. We can change user and group ownership 
of a file or directory with the 
chown
 command. As an example, if we wanted to 
change the owner of a file to 
sue
, we could do the following:
sudo chown sue myfile.txt 
In the case of a directory, we can also use the 
-R
 flag to change the ownership of the 
directory itself, as well as all the files and directories it may contain:
sudo chown -R sue mydir 
If we would like to change the group assignment to the object, we would follow the 
following syntax:
sudo chown sue:sales myfile.txt 
Notice the colon separating the user and the group. With that command, we 
established that we would like the 
sue
 user and the 
sales
 group to own this 
resource. Again, we could use 
-R
 if the object were a directory and we wanted to 
make the changes recursive.


Managing Users and Permissions

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   107   108   109   110   111   112   113   114   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish