分享

hadoop : Permission denied by sticky bit setting

grinsky 发表于 2016-6-15 10:53:15 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 23260
[mw_shl_code=xml,true]2016-06-15 10:45:00,270 INFO SecurityLogger.org.apache.hadoop.ipc.Server: Auth successful for impala/hadoop5@ATM.COM (auth:KERBEROS)
2016-06-15 10:45:00,272 INFO SecurityLogger.org.apache.hadoop.security.authorize.ServiceAuthorizationManager: Authorization successful for impala/hadoop5@ATM.COM (auth:KERBEROS) for protocol=interface org.apache.hadoop.hdfs.protocol.ClientProtocol
2016-06-15 10:45:01,929 INFO SecurityLogger.org.apache.hadoop.ipc.Server: Auth successful for mapred/hadoop5@ATM.COM (auth:KERBEROS)
2016-06-15 10:45:01,931 INFO SecurityLogger.org.apache.hadoop.security.authorize.ServiceAuthorizationManager: Authorization successful for hdfs (auth:PROXY) via mapred/hadoop5@ATM.COM (auth:KERBEROS) for protocol=interface org.apache.hadoop.hdfs.protocol.ClientProtocol
2016-06-15 10:45:01,932 WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:PROXY) via mapred/hadoop5@ATM.COM (auth:KERBEROS) cause:java.io.FileNotFoundException: File does not exist: /user/hdfs/.staging/job_1464600041082_0001/job_1464600041082_0001.summary
2016-06-15 10:45:01,932 INFO org.apache.hadoop.ipc.Server: IPC Server handler 4 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.getBlockLocations from 172.16.0.18:54437 Call#7762 Retry#0: java.io.FileNotFoundException: File does not exist: /user/hdfs/.staging/job_1464600041082_0001/job_1464600041082_0001.summary
2016-06-15 10:45:01,936 WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:mapred/hadoop5@ATM.COM (auth:KERBEROS) cause:org.apache.hadoop.security.AccessControlException: Permission denied by sticky bit setting: user=mapred, inode=hdfs_appattempt_1464600041082_0001_000002
2016-06-15 10:45:01,936 INFO org.apache.hadoop.ipc.Server: IPC Server handler 15 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.delete from 172.16.0.18:58941 Call#7763 Retry#0: org.apache.hadoop.security.AccessControlException: Permission denied by sticky bit setting: user=mapred, inode=hdfs_appattempt_1464600041082_0001_000002
2016-06-15 10:45:01,944 INFO SecurityLogger.org.apache.hadoop.ipc.Server: Auth successful for mapred/hadoop5@ATM.COM (auth:KERBEROS)
2016-06-15 10:45:01,946 INFO SecurityLogger.org.apache.hadoop.security.authorize.ServiceAuthorizationManager: Authorization successful for hdfs (auth:PROXY) via mapred/hadoop5@ATM.COM (auth:KERBEROS) for protocol=interface org.apache.hadoop.hdfs.protocol.ClientProtocol
2016-06-15 10:45:01,947 WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:PROXY) via mapred/hadoop5@ATM.COM (auth:KERBEROS) cause:java.io.FileNotFoundException: File does not exist: /user/hdfs/.staging/job_1465660321659_0025/job_1465660321659_0025.summary
2016-06-15 10:45:01,947 INFO org.apache.hadoop.ipc.Server: IPC Server handler 24 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.getBlockLocations from 172.16.0.18:54438 Call#7764 Retry#0: java.io.FileNotFoundException: File does not exist: /user/hdfs/.staging/job_1465660321659_0025/job_1465660321659_0025.summary
2016-06-15 10:45:01,949 WARN org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:mapred/hadoop5@ATM.COM (auth:KERBEROS) cause:org.apache.hadoop.security.AccessControlException: Permission denied by sticky bit setting: user=mapred, inode=hdfs_appattempt_1465660321659_0025_000002
2016-06-15 10:45:01,949 INFO org.apache.hadoop.ipc.Server: IPC Server handler 0 on 8020, call org.apache.hadoop.hdfs.protocol.ClientProtocol.delete from 172.16.0.18:58941 Call#7765 Retry#0: org.apache.hadoop.security.AccessControlException: Permission denied by sticky bit setting: user=mapred, inode=hdfs_appattempt_1465660321659_0025_000002
2016-06-15 10:45:01,958 INFO SecurityLogger.org.apache.hadoop.ipc.Server: Auth successful for mapred/hadoop5@ATM.COM (auth:KERBEROS)
2016-06-15 10:45:01,961 INFO SecurityLogger.org.apache.hadoop.security.authorize.ServiceAuthorizationManager: Authorization successful for hdfs (auth:PROXY) via mapred/hadoop5@ATM.COM (auth:KERBEROS) for protocol=interface org.apache.hadoop.hdfs.protocol.ClientProtocol[/mw_shl_code]

如上日志中有很多的 Permission denied by sticky bit setting  这个要怎么解决呢?

已有(1)人评论

跳转到指定楼层
nextuser 发表于 2016-6-15 11:48:51
本帖最后由 nextuser 于 2016-6-15 11:50 编辑

楼主应该对目录设置了sticky bit



更多详细
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set the Sticky Bit on HDFS Directories.

可以针对hdfs上的目录设置sticky bit,用于防止除superuser,owner以外的用户删除文件夹中的文件。对一个文件设置sticky bit是无效的。


~~~~~~~~~~~~~~~~~~~
suid, sgid, sticky bit
对于每组的execute权限位又有特殊的规定,这就是suid(set uid), sgid(set gid)和
sticky bit。

suid
对于owner的execute权限位,还可以设置suid标志,用s来表示,如果该位置本来
就有可执行权限位,即x,则s和x叠加后用大写的S来表示。

sgid
类似与suid,对于group的execute权限位,还可以设置guid标志,也用s来表示,
同样的,如果该位置本来就有可执行权限位,即x,则s和x叠加后用大写的S来表示。

sticky bit
不同于suid, guid,对于others的execute权限位,则可以设置sticky bit标志,
用t来表示,如果该位置本来就有可执行权限位,即x,则t和x叠加后用大写的T来表示。

sticky bit只对目录起作用,如果一个目录设置了sticky bit,则该目录下的文件只能被
该文件的owner或者root删除,其他用户即使有删除权限也无法删除该文件。

例如,/tmp目录,它的权限为d rwx rwx rwt,该目录中的文件(或目录)只能被owner
或root删除,这样大家都可以把自己的临时文件往该目录里面放,但是你的文件别人是无法
删除的。

注意:suid, sgid只对文件起作用,而sticky bit只对目录起作用。



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条