
這一定是一個非常簡單的問題,但我無法理解它我有兩個目錄,每個目錄都有一個目錄
$ ls -l
drwxrwsrwx 5 john_smith ppp 4096 8月 20 12:53 problem_dir
drwxrwsrwx 5 sam_eagle ppp 4096 8月 17 21:11 no_problem_dir
$ ls * -l
problem_dir
drwxr-sr-x 29 john_smith ppp 4096 7月 21 11:42 the_folder
no_problem_dir
drwxr-sr-x 15 kansai_robot ppp 4096 7月 26 17:24 the_folder
現在我不是約翰史密斯或山姆伊格爾,所以當我這樣做時
cp a_file no_problem_dir/the_folder/000
我將文件放入資料夾中沒有任何問題,但是當我這樣做時
cp a_file problem_dir/the_folder/000
我有
cp: cannot create regular file ‘the_folder/000/a_file’: Permission denied
我知道原因和權限。所以我有兩個問題。
- 我不知道權限「s」代表什麼(只知道r,w,x)
- 更重要的是如何將文件複製到資料夾中
the_folder
?
我嘗試了 chmod 但無濟於事,而且我不知道 root 密碼
編輯:我能在兩個資料夾中建立一個新目錄