Ho visto casi del genere con dispositivi di archiviazione difettosi, con errori nell'archiviazione remota (SAN, NAS), penso di aver persino visto qualcosa di simile causato dai permessi di montaggio. Ma è la prima volta che vedo che ciò accade sullo stesso filesystem della mia home directory.
Che tipo di autorizzazioni stanno entrando in gioco qui? Sicuramente non monta (sono sullo stesso filesystem ext4), non SELinux, non ACL. E poi?
Non ricordo come è stata creata questa directory. È probabile che sia stato creato da qualche tipo di software.
Per me la parte più strana è che la directory non è nemmeno autorizzata a vedere le sue informazioni o quelle dei suoi genitori (ultimo comando).
Sto usando Linux Mint Sarah.
[email protected] ~/somedirectory $ ls -l ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
ls: negaliu pasiekti './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace': Permission denied
viso 0
d????????? ? ? ? ? ? workspace
[email protected] ~/somedirectory $ ls -ld ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
drw-r--r-- 3 user01 user01 4096 Rgs 27 2016 ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
[email protected] ~/somedirectory $ sudo file ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:: directory
[email protected] ~/somedirectory $ sudo ls -l ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
viso 4
drwxr-xr-x 3 user01 user01 4096 Rgs 27 2016 workspace
[email protected] ~/somedirectory $ sudo stat ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
File: './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:'
Size: 4096 Blocks: 8 IO Block: 4096 aplankas
Device: 807h/2055d Inode: 3937216 Links: 3
Access: (0644/drw-r--r--) Uid: ( 1000/ user01) Gid: ( 1000/ user01)
Access: 2017-09-21 12:57:33.990819052 +0300
Modify: 2016-09-27 11:18:38.309775066 +0300
Change: 2017-03-13 14:56:40.960468954 +0200
Birth: -
[email protected] ~/somedirectory $ sudo getfacl ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
# file: deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
# owner: user01
# group: user01
user::rw-
group::r--
other::r--
[email protected] ~/somedirectory $ stat ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:
File: './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:'
Size: 4096 Blocks: 8 IO Block: 4096 aplankas
Device: 807h/2055d Inode: 3937216 Links: 3
Access: (0644/drw-r--r--) Uid: ( 1000/ user01) Gid: ( 1000/ user01)
Access: 2017-09-21 12:57:33.990819052 +0300
Modify: 2016-09-27 11:18:38.309775066 +0300
Change: 2017-03-13 14:56:40.960468954 +0200
Birth: -
[email protected] ~/somedirectory $ stat ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace
stat: nepavyksta patikrinti './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace': Permission denied
[email protected] ~/somedirectory $ sudo stat ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace
File: './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace'
Size: 4096 Blocks: 8 IO Block: 4096 aplankas
Device: 807h/2055d Inode: 3937217 Links: 3
Access: (0755/drwxr-xr-x) Uid: ( 1000/ user01) Gid: ( 1000/ user01)
Access: 2017-09-21 12:58:46.845727190 +0300
Modify: 2016-09-27 11:18:38.309775066 +0300
Change: 2016-12-02 13:56:08.298109826 +0200
Birth: -
[email protected] ~/somedirectory $ stat .
File: '.'
Size: 4096 Blocks: 8 IO Block: 4096 aplankas
Device: 807h/2055d Inode: 3278479 Links: 23
Access: (0755/drwxr-xr-x) Uid: ( 1000/ user01) Gid: ( 1000/ user01)
Access: 2017-09-21 09:46:22.102269130 +0300
Modify: 2017-09-20 17:33:04.564009275 +0300
Change: 2017-09-20 17:33:04.564009275 +0300
Birth: -
[email protected] ~/somedirectory $ ll ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/
ls: negaliu pasiekti './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace': Permission denied
ls: negaliu pasiekti './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/.': Permission denied
ls: negaliu pasiekti './deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/..': Permission denied
viso 0
d????????? ? ? ? ? ? ./
d????????? ? ? ? ? ? ../
d????????? ? ? ? ? ? workspace/
Attributi:
[email protected] ~/somedirectory $ sudo lsattr ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/
-------------e-- ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace
[email protected] ~/somedirectory $ sudo lsattr ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace
-------------e-- ./deploy_dir/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/bin/D:/workspace/directory2
Risposta accettata:
Sui file è sufficiente leggere per verificare i permessi. È necessario leggere ed eseguire sulle cartelle in ls.
chmod -R a+X ./deploy_dir
X maiuscola per impostare l'esecuzione solo su cartelle (e file che hanno già il bit di esecuzione impostato).
Correlati:Ssh:come funziona il tunneling SSH inverso?