0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Linucレベル1勉強メモ #22

Posted at

# 第二章 ファイル・ディレクトリの操作と管理

練習問題2.7
以下のコマンドを実行しました。
$ ls -l
-rw-r--r-- 1 linucuser linucuser 670293 Feb 19 00:50 services
$ umask
0022
$ ln services services.new
$ ln services.new services.hard
$ ln -s services services/sym
chmod u+w,g+r services.hard
この時のservices.newファイルのパーミッキョンを3桁の数値で表してください。

(解答)644

(解説)
lnコマンドの実行結果から、servicesファイル、services.hardファイルはハードリンクです。したがって、どのファイルのパーミッションを変更しても、すべてのファイルのパーミッションは同じになります。services.hardファイルを作成した時点でのパーミッションは、servicesファイルと同じなので「644」です。これに「u+w, g+r」としても、所有者にw、グループにrのアクセス権はすでに設定されているので、パーミッションは変わりません、umaskは、リンクファイルの作成には関係ありません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?