2014-06-19 7 views
1

내 파일에 이상한 사용자 권한이 있습니다.알 수없는 사용자 권한 (- ??????????? myFile.php)

user1로 로그하면 파일의 user2 소유자를 설정했습니다. 그것은 효과가 있었다.

 -rw-r-xr-x 1 user2 user2 21090 Jun 18 16:28 myFile.php 
     drw-r-xr-x 2 user2 user2 4096 Jun 18 16:30 font 

하지만 user2로 로그인 할 때 나는 이상한 알 수없는 권리가 있습니다.

 -????????? ? ? ? ?    ? myFile.php 
     d????????? ? ? ? ?    ? font/ 
+0

는 [유닉스 stackexchange]에 문의 상담하시기 바랍니다 (http://unix.stackexchange.com/). – sestus

+0

'fsck'을 실행 해보십시오. 파일 시스템이 손상되었을 수 있습니다. – choroba

답변

3

"x"비트가없는 최상위 디렉토리가 설정되어 있습니다.

chmod u=rwx test2/; ls -l test2 
total 4 
drwxr-xr-x 2 user group 4096 Jun 19 14:43 dir 
-rw-r--r-- 1 user group 0 Jun 19 14:43 file 

chmod u=rw test2/; ls -l test2 
ls: cannot access test2/file: Permission denied 
ls: cannot access test2/dir: Permission denied 
total 0 
d????????? ? ? ? ?   ? dir 
-????????? ? ? ? ?   ? file 

이 문제를 해결하려면 "x"비트를 루트 디렉토리의 다음 섹션에 추가하십시오. 일반적으로 "그룹"부분은 관련이 있지만 상황에 따라 "다른"또는 "사용자"일 수 있습니다.

chmod g+x /path/to/directory 

추가 읽기를 들어 http://www.linux.com/learn/tutorials/309527-understanding-linux-file-permissions