{"id":21547,"date":"2023-09-30T13:42:23","date_gmt":"2023-09-30T13:42:23","guid":{"rendered":"https:\/\/linuxways.net\/?p=21547"},"modified":"2023-09-30T13:43:53","modified_gmt":"2023-09-30T13:43:53","slug":"how-do-you-change-the-ownership-of-a-file-in-linux-ubuntu","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-do-you-change-the-ownership-of-a-file-in-linux-ubuntu\/","title":{"rendered":"How do you Change the Ownership of a File in Linux\/Ubuntu?"},"content":{"rendered":"<p>Linux Distros can have multiple users and each user can have their own permissions for accessing specific files. The files having different users and Ubuntu having multiple users as well reduce the risk of damaging or crashing the system. Having different users for specific files reduces the security risks, improves the privacy of the Ubuntu system, and is useful for resource sharing.<\/p>\n<p>This article discusses the use of changing the ownership of files in Ubuntu.<\/p>\n<h2><strong>How do you Change the Ownership of a File in Linux\/Ubuntu?<\/strong><\/h2>\n<p>The \u201cchown\u201d command changes the owner of a file or folder in Ubuntu. The syntax to use the \u201cchown\u201d command is:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">chown<\/span> <span class=\"sy0\">&lt;<\/span>newUserName<span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">&lt;<\/span>FileName<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>The file name should be complete, i.e. the name string and the extension. Considering the file \u201cfileA.txt\u201d in our case:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1662\" height=\"211\" class=\"wp-image-21548\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-1.png 1662w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-1-300x38.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-1-1024x130.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-1-768x98.png 768w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-1-1536x195.png 1536w\" sizes=\"auto, (max-width: 1662px) 100vw, 1662px\" \/><\/p>\n<p>To see the current owner of the file, use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">getfacl <span class=\"sy0\">&lt;<\/span>fileName<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>In our case, the file name is \u201cfileA.txt\u201d:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">getfacl fileA.txt<\/div><\/div>\n<p>This will display the owner&#8217;s details in the terminal:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"241\" class=\"wp-image-21549\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-2.png 730w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-2-300x99.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/p>\n<p>Before changing the ownership of the file, ensure the user is already added to your system. To list all the users use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">getent<\/span> <span class=\"kw2\">passwd<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">awk<\/span> -F: <span class=\"st_h\">'{print $1}'<\/span><\/div><\/div>\n<p>The \u201cawk\u201d file filters the search. If you don\u2019t know how it works, check out <a href=\"https:\/\/linuxways.net\/de\/list-users-with-awk-ubuntu\/\">List Users with awk Command<\/a> to learn more about \u201cawk\u201d.<\/p>\n<p>The \u201cgetent passwd\u201d will list all the current users:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"314\" class=\"wp-image-21550\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-3.png 737w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-3-300x128.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>In our case, scrolling down, we have the \u201cbob\u201d user as well:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"737\" height=\"238\" class=\"wp-image-21551\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-4.png 737w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-4-300x97.png 300w\" sizes=\"auto, (max-width: 737px) 100vw, 737px\" \/><\/p>\n<p>Now to change the owner of the file, we will use the \u201cchown\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chown<\/span> bob fileA.txt<\/div><\/div>\n<p>This will change the ownership of \u201cfileA.txt\u201d from \u201ctaha\u201d to \u201cbob\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"51\" class=\"wp-image-21552\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-5.png 724w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-5-300x21.png 300w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/p>\n<p>To verify the change in ownership, use the \u201cgetfacl\u201d command again with \u201cfileA.txt\u201d:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">getfacl fileA.txt<\/div><\/div>\n<p>The owner of \u201cfileA.txt\u201d will be \u201cbob\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"383\" class=\"wp-image-21553\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-6.png 726w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-6-300x158.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/p>\n<h2><strong>Change the Ownership of Multiple Files in Linux\/Ubuntu<\/strong><\/h2>\n<p>The Owners of Multiple files can be changed using the syntax:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">chown<\/span> <span class=\"sy0\">&lt;<\/span>newUserName<span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">&lt;<\/span>fileA<span class=\"sy0\">&gt;&lt;<\/span>fileB<span class=\"sy0\">&gt;<\/span>....<span class=\"sy0\">&lt;<\/span>fileN<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>In our case, we will change the owner of the file \u201cabc.txt\u201d, \u201ccde.txt\u201d, and \u201cfileH.txt\u201d to \u201cbob\u201d. The current ownership of these files can be found using the \u201cgetfacl\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">getfacl abc.txt cde.txt fileH.txt<\/div><\/div>\n<p>The current owner is \u201ctaha\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"423\" class=\"wp-image-21554\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-7.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-7.png 727w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-7-300x175.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/p>\n<p>Now to change the ownership to \u201cbob\u201d, the \u201cchown\u201d command will be used again with multiple files:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chown<\/span> bob abc.txt cde.txt fileH.txt<\/div><\/div>\n<p>The file ownership will be changed to \u201cbob\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"75\" class=\"wp-image-21555\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-8.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-8-300x31.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>The new ownership can be verified using the \u201cgetfacl\u201d command again:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"421\" class=\"wp-image-21556\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-9.png 727w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-9-300x174.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/p>\n<h2><strong>Change the Group of Files in Linux\/Ubuntu<\/strong><\/h2>\n<p>Apart from changing the ownership of a file, the Group of a file can also be changed. The syntax to change the group of a file is:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">chown<\/span> :<span class=\"sy0\">&lt;<\/span>newGroupName<span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">&lt;<\/span>fileName<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>In our case, we have a file \u201cfileL.txt\u201d. The group of the file can be checked using the same \u201cgetfacl\u201d command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">getfacl fileL.txt<\/div><\/div>\n<p>The group of \u201cfileL.txt\u201d is \u201ctaha\u201d as seen below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"727\" height=\"165\" class=\"wp-image-21557\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-10.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-10.png 727w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-10-300x68.png 300w\" sizes=\"auto, (max-width: 727px) 100vw, 727px\" \/><\/p>\n<p>Now to change the group of \u201cfileL.txt\u201d, the \u201cchown\u201d command will be used:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chown<\/span> :genz fileL.txt<\/div><\/div>\n<p>The group of \u201cfileL.txt\u201d will change to \u201cgenz\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"729\" height=\"171\" class=\"wp-image-21558\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-11.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-11.png 729w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-11-300x70.png 300w\" sizes=\"auto, (max-width: 729px) 100vw, 729px\" \/><\/p>\n<h2><strong>Change the Group and Ownership of Files at the Same Instant in Linux\/Ubuntu<\/strong><\/h2>\n<p>To change the Group and the Owner of a file at the same time, use the new owner name with the Colon of the new Group:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">chmod<\/span> <span class=\"sy0\">&lt;<\/span>newUserName<span class=\"sy0\">&gt;<\/span>:<span class=\"sy0\">&lt;<\/span>newGroupName<span class=\"sy0\">&gt;<\/span> <span class=\"sy0\">&lt;<\/span>fileName<span class=\"sy0\">&gt;<\/span><\/div><\/div>\n<p>In our case, the \u201cfileJ.txt\u201d has the owner and group \u201ctaha\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"732\" height=\"175\" class=\"wp-image-21559\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-12.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-12.png 732w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-12-300x72.png 300w\" sizes=\"auto, (max-width: 732px) 100vw, 732px\" \/><\/p>\n<p>To change the Ownership to \u201cbob\u201d and the group to \u201cgenz\u201d, use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chown<\/span> bob:genz fileJ.txt<\/div><\/div>\n<p>The ownership and group of \u201cfileJ.txt\u201d will change:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"49\" class=\"wp-image-21560\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-13.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-13.png 731w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-13-300x20.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>The owner and group changes can be verified using the \u201cgetfacl\u201d command again:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"723\" height=\"188\" class=\"wp-image-21562\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-14.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-14.png 723w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-14-300x78.png 300w\" sizes=\"auto, (max-width: 723px) 100vw, 723px\" \/><\/p>\n<h2><strong>Change the Ownership of Files in Sub Directory in Linux\/Ubuntu<\/strong><\/h2>\n<p>The ownership of files inside a directory and sub-directory can also be changed. Considering our previous example, we have a Documents Directory and inside the Documents Directory, multiple sub-directories exist:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1409\" height=\"170\" class=\"wp-image-21563\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-15.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-15.png 1409w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-15-300x36.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-15-1024x124.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-15-768x93.png 768w\" sizes=\"auto, (max-width: 1409px) 100vw, 1409px\" \/><\/p>\n<p>To change the ownership of all the files of Documents and files inside the sub-directories, use the command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chown<\/span> <span class=\"re5\">-R<\/span> bob Documents<span class=\"sy0\">\/<\/span><\/div><\/div>\n<p>The ownership of all files inside the Documents Directory and all the files in the Sub-directory will change to \u201cbob\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"54\" class=\"wp-image-21564\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-16.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-16.png 619w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-16-300x26.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/p>\n<p>The changed ownership can be verified using the below command:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">ls<\/span> <span class=\"re5\">-lR<\/span> Documents<span class=\"sy0\">\/<\/span><\/div><\/div>\n<p>This will display the owner of all files and files inside the sub-directories as well. In our case, the ownership changed to \u201cbob\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"648\" height=\"758\" class=\"wp-image-21565\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-17.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-17.png 648w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-17-256x300.png 256w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/p>\n<h2><strong>Change the Ownership of a File according to a Reference in Linux\/Ubuntu<\/strong><\/h2>\n<p>The ownership of a file can also be changed according to a reference to a specific file. The file that needs a new owner will have the owner of that referenced file. In our case, the file \u201cfileA.txt\u201d has the owner \u201ctaha\u201d and can be checked using the \u201cgetfacl\u201d command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"645\" height=\"144\" class=\"wp-image-21566\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-18.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-18.png 645w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-18-300x67.png 300w\" sizes=\"auto, (max-width: 645px) 100vw, 645px\" \/><\/p>\n<p>The file \u201cfileB.txt\u201d has the owner \u201cbob\u201d and can be verified using the \u201cgetfacl\u201d command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"641\" height=\"146\" class=\"wp-image-21567\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-19.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-19.png 641w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-19-300x68.png 300w\" sizes=\"auto, (max-width: 641px) 100vw, 641px\" \/><\/p>\n<p>Now to change the ownership of the file \u201cfileB.txt\u201d to the owner of \u201cfileA.txt\u201d the command used will be:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">chown<\/span> <span class=\"re5\">--reference<\/span>=fileA.txt fileB.txt<\/div><\/div>\n<p>This will make the owner of \u201cfileB.txt\u201d the exact same as \u201cfileA.txt\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"648\" height=\"37\" class=\"wp-image-21568\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-20.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-20.png 648w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-20-300x17.png 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/p>\n<p>To verify, the \u201cgetfacl\u201d command can be used:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\">getfacl fileB.txt<\/div><\/div>\n<p>As you can see the owner of the \u201cfileB.txt\u201d is the same as the owner of \u201cfileA.txt\u201d:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"647\" height=\"145\" class=\"wp-image-21569\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-21.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-21.png 647w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/09\/word-image-21547-21-300x67.png 300w\" sizes=\"auto, (max-width: 647px) 100vw, 647px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>Multiple ways and methodologies can be used to change the ownership of files in Ubuntu. The \u201cchown\u201d is a useful command to change the ownership of files and can be used to change the owner of either a single file or multiple files inside a directory and a sub-directory as well. In this article, we discussed multiple methods of changing the owner of files using the \u201cchown\u201d command.<\/p>","protected":false},"excerpt":{"rendered":"<p>The \u201cchown\u201d is a useful command to change the ownership of files and change the ownership of multiple files inside a directory and a sub-directory as well.<\/p>","protected":false},"author":110,"featured_media":21561,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-21547","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=21547"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/21547\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/21561"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=21547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=21547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=21547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}