4750 public_html的权限


0

注意到public_html获得了4750的许可,而不是经典的0750。 我尝试更改所有者或权限,但无论我做什么,它仍然是4750.任何人都知道如何更改一个卡在4750上的文件夹的权限?!

stat public_html
  File: `public_html'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 903h/2307d      Inode: 106692622   Links: 11
Access: (4750/drwsr-x---)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-08-22 20:00:51.000000000 +0200
Modify: 2016-08-22 19:48:45.000000000 +0200
Change: 2016-08-22 20:06:05.000000000 +0200

chown newuser.nobody public_html
root@hx [/home/somedir]# stat public_html
  File: `public_html'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 903h/2307d      Inode: 106692622   Links: 11
Access: (4750/drwsr-x---)  Uid: (  934/newuser)   Gid: (   99/  nobody)
Access: 2016-08-22 20:00:51.000000000 +0200
Modify: 2016-08-22 19:48:45.000000000 +0200
Change: 2016-08-22 20:06:22.000000000 +0200
root@hx [/home/somedir]# chmod 0750 public_html
root@hx [/home/somedir]# stat public_html
  File: `public_html'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 903h/2307d      Inode: 106692622   Links: 11
Access: (4750/drwsr-x---)  Uid: (  934/newuser)   Gid: (   99/  nobody)
Access: 2016-08-22 20:00:51.000000000 +0200
Modify: 2016-08-22 19:48:45.000000000 +0200
Change: 2016-08-22 20:08:59.000000000 +0200

Answers:


2

您应该能够清除setuid位

chmod u-s public_html

man chmod

CHMOD 除非另外明确指定,否则保留目录的set-user-ID和set-group-ID位。您可以使用符号模式设置或清除位 ü+ S 克-S ,您可以使用数字模式设置(但不清除)位。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.