2017-12-15 5 views
-1

rootユーザが作成したフォルダが/root/folder_trialです。私はユーザreaderuserを作成して、/root/folder_trialの中のすべてのファイルを読むことができますが、それ以外は何もしません。Ubuntuの別のユーザが所有するフォルダに対する読み取り専用アクセス権を持つユーザを作成します

私は、次のコマンドを実行して、ユーザーを作成しました:

[email protected]:~# adduser readeruser 
Adding user `readeruser' ... 
Adding new group `readeruser' (1001) ... 
Adding new user `readeruser' (1001) with group `readeruser' ... 
Creating home directory `/home/readeruser' ... 
Copying files from `/etc/skel' ... 
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully 
Changing the user information for readeruser 
Enter the new value, or press ENTER for the default 
     Full Name []: 
     Room Number []: 
     Work Phone []: 
     Home Phone []: 
     Other []: 
Is the information correct? [Y/n] y 
[email protected]:~#      

は今どのように私は特定のフォルダのために、このユーザーに権限を与えていますか?それはすでにあなたの質問にそこで行われていて「readeruser」を想定し

+0

スタックオーバーフローは、プログラミングや開発の質問のためのサイトです。この質問は、プログラミングや開発に関するものではないので、話題にはならないようです。ヘルプセンターの[ここではどのトピックを参照できますか](http://stackoverflow.com/help/on-topic)を参照してください。おそらく、[スーパーユーザ](http://superuser.com/)や[Unix&Linux Stack Exchange](http://unix.stackexchange.com/)の方が良いかもしれません。 – jww

答えて

-1

はグループ「readuser」を入力しました:

... 
Adding new group `readeruser' (1001) ... 
Adding new user `readeruser' (1001) with group `readeruser' ... 
... 

あなただけに、ファイルの所有権を変更することができます。

所有者(U)=ルート(必要に応じて変更なし)

グループ(G)= readeruser

を実行し、このコマンド:

chown root:readeruser /root/folder_trial 

u = rwx、g = rx、o = ---(ユーザーは読み取り、書き込み、実行、グループは読み取りと実行が可能で、他は何もできません)

注:ディレクトリ

実行このコマンドを入力するために実行する必要があります

chmod u=rwx,g=rx,o= /root/folder_trial 
関連する問題