一般ユーザーとして chown コマンドまたは chgrp コマンドを実行して、ファイルのユーザー所有権を変更する
Issue
- UNIX から移行したアプリケーションがあり、root 権限を持たないユーザーとして
chown
コマンドを実行してファイルの所有者を変更しようとしました。RHEL で、以下のようなエラーメッセージが発生し、所有権を変更することができません。
chown: changing ownership of `somefile': Operation not permitted
この問題を回避する方法はありませんか?
- root 権限を持たないユーザーが
chgrp
を実行すると、以下のエラーメッセージが発生します。
chgrp: changing group of `somefile': Operation not permitted
- rsync に -a フラグを追加して、ユーザーまたはグループの所有権を変更することができません。
# rsync -a file1 file2
rsync: chgrp "/test/.file2.wJyVrN" failed: Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
Environment
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.