AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-13171

Matthias Braun's questions

Martin Hope
Matthias Braun
Asked: 2020-01-24 10:03:22 +0800 CST

使用 read 输入嗅探密码并作为命令行参数传递

  • 1

我想表明通过输入密码read是不安全的。

要将其嵌入到中途现实场景中,假设我使用以下命令提示用户输入密码并让 7z¹ 从中创建加密存档:

read -s -p "Enter password: " pass && 7z a test_file.zip test_file -p"$pass"; unset pass

我第一次尝试泄露密码是通过设置审计规则:

auditctl -a always,exit -F path=/bin/7z -F perm=x

果然,当我执行涉及readand的命令7z时,运行时有一个日志条目ausearch -f /bin/7z:

time->Thu Jan 23 18:37:06 2020
type=PROCTITLE msg=audit(1579801026.734:2688): proctitle=2F62696E2F7368002F7573722F62696E2F377A006100746573745F66696C652E7A697000746573745F66696C65002D7074686973206973207665727920736563726574
type=PATH msg=audit(1579801026.734:2688): item=2 name="/lib64/ld-linux-x86-64.so.2" inode=1969104 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1579801026.734:2688): item=1 name="/bin/sh" inode=1972625 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=PATH msg=audit(1579801026.734:2688): item=0 name="/usr/bin/7z" inode=1998961 dev=08:03 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
type=CWD msg=audit(1579801026.734:2688): cwd="/home/mb/experiments"
type=EXECVE msg=audit(1579801026.734:2688): argc=6 a0="/bin/sh" a1="/usr/bin/7z" a2="a" a3="test_file.zip" a4="test_file" a5=2D7074686973206973207665727920736563726574
type=SYSCALL msg=audit(1579801026.734:2688): arch=c000003e syscall=59 success=yes exit=0 a0=563aa2479290 a1=563aa247d040 a2=563aa247fe10 a3=8 items=3 ppid=2690563 pid=2690868 auid=1000 uid=1000 gid=1000 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=pts17 ses=1 comm="7z" exe="/usr/bin/bash" key=(null)

这条线似乎最有希望:

type=EXECVE msg=audit(1579801026.734:2688): argc=6 a0="/bin/sh" a1="/usr/bin/7z" a2="a" a3="test_file.zip" a4="test_file" a5=2D7074686973206973207665727920736563726574

但是字符串2D7074686973206973207665727920736563726574不是我输入的密码。

我的问题是双重的:

  • audit获取密码的正确工具是什么?如果是这样,我需要对审计规则进行更改吗?
  • 除了 ,还有更简单的方法audit来获取密码吗?

¹我知道 7z 可以自行提示输入密码。

security command-line
  • 1 个回答
  • 570 Views
Martin Hope
Matthias Braun
Asked: 2019-09-25 05:54:20 +0800 CST

使用宏获取发件人的邮件地址

  • 2

在 Mutt 的索引视图中,我想将发件人的邮件地址复制到系统剪贴板(xclip例如,使用 )。

有没有办法使用宏或任何其他方式获取当前所选邮件的发件人邮件地址?

mutt
  • 1 个回答
  • 200 Views
Martin Hope
Matthias Braun
Asked: 2019-08-30 10:04:07 +0800 CST

NameOwnerChanged 事件每秒发送到空目标

  • 0

Running dbus-monitor --system,显示了很多这样的事件:

signal time=1567100862.252579 sender=org.freedesktop.DBus -> destination=(null destination) serial=467227 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
  string ":1.381958"
  string ":1.381958"
  string ""
signal time=1567100863.303822 sender=org.freedesktop.DBus -> destination=(null destination) serial=467228 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
  string ":1.381959"
  string ""
  string ":1.381959"
signal time=1567100863.311397 sender=org.freedesktop.DBus -> destination=(null destination) serial=467229 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
  string ":1.381959"
  string ":1.381959"
  string ""
signal time=1567100863.315985 sender=org.freedesktop.DBus -> destination=(null destination) serial=467230 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
  string ":1.381960"
  string ""
  string ":1.381960"
signal time=1567100863.322069 sender=org.freedesktop.DBus -> destination=(null destination) serial=467231 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
  string ":1.381960"
  string ":1.381960"
  string ""

大约每秒都有一个新事件发生。

我注意到这些事件在调用之前不会发生startx。

我在运行 i3 的 Arch Linux 5.2.9 上。

这是 DBus 使用的某种计时器或心跳吗?

i3 d-bus
  • 2 个回答
  • 446 Views
Martin Hope
Matthias Braun
Asked: 2019-08-13 07:39:57 +0800 CST

转发邮件时默认包含附件

  • 1

目前,我在使用 Mutt 转发邮件时手动包含每个附件。

如此处所述,我通过标记各个附件然后使用;f.

有没有办法让 Mutt 在转发邮件时默认包含所有附件?

mutt
  • 1 个回答
  • 121 Views
Martin Hope
Matthias Braun
Asked: 2019-07-24 08:58:13 +0800 CST

切换邮箱时的延迟

  • 2

每次在 Mutt 中切换邮箱时都会出现一个问题:

在另一个邮箱可见之前有一个明显的延迟,似乎与邮箱的大小无关。

有什么我可以在我的配置中muttrc加快速度吗?

mutt
  • 1 个回答
  • 61 Views
Martin Hope
Matthias Braun
Asked: 2019-04-10 23:45:11 +0800 CST

获取上一个搜索结果

  • 2

当我在 Mutt 中使用 开始搜索时/,我可以使用 轻松转到下一个搜索结果n。

但是如果我想往另一个方向看之前的搜索结果,即之前匹配的电子邮件怎么办?

是否有一个键绑定?在 Vim 中,这是N.

mutt
  • 1 个回答
  • 140 Views
Martin Hope
Matthias Braun
Asked: 2019-02-05 04:33:38 +0800 CST

服务中没有足够的“\”字符

  • 7

从Arch Linux Wiki 条目中收集,我认为是通过 SMB 从我的 Arch Linux 4.20.6 访问 Windows 共享驱动器的最小设置:

  • sudo pacman -S samba

  • sudo echo "logging = systemd" >> /etc/samba/smb.conf因为smb服务需要这个配置文件,否则它会因错误而崩溃:

    Job for smb.service failed because the control process exited with error code.
    See "systemctl status smb.service" and "journalctl -xe" for details.
    
  • sudo systemctl start smb

假设远程 Windows 机器位于172.16.17.52,我可以列出共享名称

smbclient -L 172.16.17.52 -U MyUserName%MyPassword -W OurWindowsDomain

OurRemoteDirectory其中包括我想访问的具有共享名称的“磁盘”类型的服务,即从它传输文件和向它传输文件。

希望能够OurRemoteDirectory在共享驱动器上访问,我发出

smbclient 172.16.17.52/OurRemoteDirectory -U MyUserName%MyPassword -W OurWindowsDomain

但这产生了这个错误消息:

Unable to initialize messaging context

172.16.17.52: Not enough '\' characters in service

如何修复此错误并OurRemoteDirectory在共享驱动器上访问?

smbclient
  • 1 个回答
  • 19249 Views
Martin Hope
Matthias Braun
Asked: 2019-01-25 06:59:48 +0800 CST

无法设置 vsftpd 的根目录

  • 0

我的 Arch Linux 4.20.2 从vsftpd的默认根目录/srv/ftp/.

我对配置文件所做的唯一补充/etc/vsftpd.conf是

seccomp_sandbox=NO

这消除了访问文件时在 Firefox 中显示的以下错误:

500 OOPS:priv_sock_get_cmd

这一切都很好,但我想提供来自不同目录的文件,比如/home/jenkins.

查阅手册vsftpd.conf,我将其添加到/etc/vsftpd.conf:

anon_root=/home/jenkins/

为了使更改生效,我打电话给systemctl restart vsftpd.

然而,vsftpd(我使用的是 3.0.3 版)仍然在其默认根目录中提供文件,/srv/ftp/.

这是怎么回事?

arch-linux vsftpd
  • 1 个回答
  • 499 Views
Martin Hope
Matthias Braun
Asked: 2019-01-22 03:57:56 +0800 CST

熔断器卸载后:冻结任务失败

  • 2

在使用 Arch Linux 4.20.2 卸载远程文件系统fusermount -u ~/sshfs_mount/然后调用systemctl suspend我的 Arch Linux 4.20.2 后冻结了大约 20 秒。

在这 20 秒之后,系统再次响应(它没有挂起)。然后我再次尝试暂停,这次成功了。

检查出来journalctl,我发现了很多这样的消息:

Jan 21 10:10:45 me systemd-logind[510]: Power key pressed.
Jan 21 10:10:45 me kernel: PM: suspend exit
Jan 21 10:10:45 me kernel: PM: suspend entry (s2idle)
Jan 21 10:11:05 me kernel: PM: Syncing filesystems ... done.
Jan 21 10:11:05 me kernel: Freezing user space processes ... 
Jan 21 10:11:05 me kernel: Freezing of tasks failed after 20.002 seconds (15 tasks refusing to freeze, wq_busy=0):
Jan 21 10:11:05 me kernel: pool            D    0 10812   5584 0x00000084
Jan 21 10:11:05 me kernel: Call Trace:
Jan 21 10:11:05 me kernel:  ? __schedule+0x29b/0x8b0
Jan 21 10:11:05 me kernel:  ? __wake_up_common+0x77/0x140
Jan 21 10:11:05 me kernel:  ? preempt_count_add+0x79/0xb0
Jan 21 10:11:05 me kernel:  schedule+0x32/0x90
Jan 21 10:11:05 me kernel:  request_wait_answer+0xaa/0x1f0 [fuse]
Jan 21 10:11:05 me kernel:  ? wait_woken+0x80/0x80
Jan 21 10:11:05 me kernel:  __fuse_request_send+0x61/0x80 [fuse]
Jan 21 10:11:05 me kernel:  fuse_simple_request+0xcd/0x190 [fuse]
Jan 21 10:11:05 me kernel:  fuse_statfs+0xde/0x140 [fuse]
Jan 21 10:11:05 me kernel:  statfs_by_dentry+0x67/0x90
Jan 21 10:11:05 me kernel:  vfs_statfs+0x16/0xc0
Jan 21 10:11:05 me kernel:  user_statfs+0x54/0xa0
Jan 21 10:11:05 me kernel:  __se_sys_statfs+0x25/0x60
Jan 21 10:11:05 me kernel:  do_syscall_64+0x5b/0x170
Jan 21 10:11:05 me kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Jan 21 10:11:05 me kernel: RIP: 0033:0x7fe2aa8571ab
Jan 21 10:11:05 me kernel: Code: Bad RIP value.
Jan 21 10:11:05 me kernel: RSP: 002b:00007fe221efecf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000089
Jan 21 10:11:05 me kernel: RAX: ffffffffffffffda RBX: 00007fe27258e3a0 RCX: 00007fe2aa8571ab
Jan 21 10:11:05 me kernel: RDX: 00007fe2725869b0 RSI: 00007fe221efed20 RDI: 00007fe2689573a0
Jan 21 10:11:05 me kernel: RBP: 00007fe221efee80 R08: 00007fe29713ee58 R09: 00007fe29713ee60
Jan 21 10:11:05 me kernel: R10: 00007fe29714e078 R11: 0000000000000246 R12: 00007fe268957040
Jan 21 10:11:05 me kernel: R13: 00007ffc0f96f75f R14: 00007fe221eff700 R15: 000000000000001e
Jan 21 10:11:05 me kernel: pool            D    0 10813   5584 0x00000084

还有这个:

Jan 21 10:11:05 me kernel: OOM killer enabled.
Jan 21 10:11:05 me kernel: Restarting tasks ... done.
Jan 21 10:11:05 me systemd-sleep[23193]: Failed to suspend system. System resumed again: Device or resource busy
Jan 21 10:11:05 me kernel: PM: suspend exit
Jan 21 10:11:05 me systemd[1]: systemd-suspend.service: Main process exited, code=exited, status=1/FAILURE
Jan 21 10:11:05 me systemd[1]: systemd-suspend.service: Failed with result 'exit-code'.
Jan 21 10:11:05 me systemd[1]: Failed to start Suspend.
Jan 21 10:11:05 me systemd[1]: Dependency failed for Suspend.
Jan 21 10:11:05 me systemd[1]: suspend.target: Job suspend.target/start failed with result 'dependency'.
Jan 21 10:11:05 me audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Jan 21 10:11:05 me systemd[1]: Stopped target Sleep.
Jan 21 10:11:05 me kernel: audit: type=1130 audit(1548061865.860:643): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-suspend comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
Jan 21 10:11:05 me systemd-logind[510]: Operation 'sleep' finished.

根据pacman -Qi systemd,我得到了 240.34-3 版本。

我不知道fusermount和症状之间是否存在因果关系,但我认为存在因果关系,因为journalctl.

这里提到了这个问题,2012 年最新的非自动回复建议在挂起之前卸载远程文件系统;但这就是我在机器冻结之前所做的。

这是该问题的另一份报告,不包含解决方法或解决方案。

这个问题的答案虽然被接受和赞成,但不包含对我未来如何避免该问题的可行建议。

arch-linux systemd
  • 1 个回答
  • 1026 Views
Martin Hope
Matthias Braun
Asked: 2018-11-24 04:42:18 +0800 CST

hp-setup 找不到通过 USB 连接的打印机

  • 4

我在 Arch Linux 4.19.2 系统上使用 HP LaserJet P1102 时遇到问题。

lsusb显示打印机已连接:

Bus 002 Device 005: ID 03f0:002a HP, Inc LaserJet P1102

在journalctl中,我在通过 USB 插入打印机时看到这些消息:

kernel: usb 2-1.1: new high-speed USB device number 7 using ehci-pci
kernel: usb 2-1.1: New USB device found, idVendor=03f0, idProduct=002a, bcdDevice= 1.00
kernel: usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 2-1.1: Product: HP LaserJet Professional P1102
kernel: usb 2-1.1: Manufacturer: Hewlett-Packard
kernel: usb 2-1.1: SerialNumber: 000000000Q80X0EGSI1c
kernel: usb-storage 2-1.1:1.0: USB Mass Storage device detected
kernel: scsi host6: usb-storage 2-1.1:1.0
mtp-probe[14854]: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1"
mtp-probe[14854]: bus: 2, device: 7 was not an MTP device
mtp-probe[14867]: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1"
mtp-probe[14867]: bus: 2, device: 7 was not an MTP device

但是当运行sudo hp-setup -i并选择 0 来检查 USB 连接的打印机时,我得到:

Using connection type: usb

error: No device selected/specified or that supports this functionality.

输出systemctl status org.cups.cupsd.service:

● org.cups.cupsd.service - CUPS Scheduler
  Loaded: loaded (/usr/lib/systemd/system/org.cups.cupsd.service; enabled; vendor preset: disabled)
  Active: active (running) since Fri 2018-11-23 13:03:23 CET; 25min ago
    Docs: man:cupsd(8)
Main PID: 6271 (cupsd)
  Status: "Scheduler is running..."
    Tasks: 1 (limit: 4915)
  Memory: 7.5M
  CGroup: /system.slice/org.cups.cupsd.service
          └─6271 /usr/bin/cupsd -l

sudo hp-check崩溃:

HP Linux Imaging and Printing System (ver. 3.18.6)
Dependency/Version Check Utility ver. 15.1

Copyright (c) 2001-15 HP Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper   
dependencies are installed to successfully compile HPLIP.                                                                                              
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied     
tarball has the proper dependencies installed to successfully run.                                                                                     
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time            
dependencies).                                                                                                                                         

Check types:                                                                                                                                           
a. EXTERNALDEP - External Dependencies                                                                                                                 
b. GENERALDEP - General Dependencies (required both at compile and run time)                                                                           
c. COMPILEDEP - Compile time Dependencies                                                                                                              
d. [All are run-time checks]                                                                                                                           
PYEXT SCANCONF QUEUES PERMISSION                                                                                                                       

Status Types:
    OK
    MISSING       - Missing Dependency or Permission or Plug-in
    INCOMPAT      - Incompatible dependency-version or Plugin-version

-Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 266, in walkFiles
    names = os.listdir(root)
FileNotFoundError: [Errno 2] No such file or directory: '/etc/PolicyKit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/hplip/base/utils.py", line 268, in walkFiles
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/hp-check", line 861, in <module>
    dep.core.init()
  File "/usr/share/hplip/installer/core_install.py", line 500, in init
    self.check_dependencies(callback)
  File "/usr/share/hplip/installer/core_install.py", line 593, in check_dependencies
    self.have_dependencies[d] = self.dependencies[d][3]()
  File "/usr/share/hplip/installer/core_install.py", line 1164, in check_policykit
    if check_file('PolicyKit.conf', "/etc/PolicyKit") and check_file('org.gnome.PolicyKit.AuthorizationManager.service', "/usr/share/dbus-1/services"):
  File "/usr/share/hplip/installer/dcheck.py", line 108, in check_file
    for w in utils.walkFiles(dir, recurse=True, abs_paths=True, return_folders=False, pattern=f):
RuntimeError: generator raised StopIteration

所有软件包都更新到最新版本,意思sudo pacman -Syu是“无事可做”。

我已经通过 pacman 安装了 Python 3.7.1。

这是惠普软件的错误吗?与较新的 Python 版本引入的不兼容?

cups printing
  • 1 个回答
  • 7543 Views
Martin Hope
Matthias Braun
Asked: 2018-10-08 06:09:03 +0800 CST

简单的摇杆示例

  • 18

我想为我在 Arch Linux 中使用的Sway提供一个简单、平静的状态栏。

到目前为止,我发现的配置使用单独的程序,例如waybar或i3status。status_command虽然它们看起来很棒,但我想保持简单并man sway-bar直接使用。

最好,此状态栏与i3一样好,这应该是可能的,因为 Sway 旨在使其配置与 i3 兼容。

sway
  • 4 个回答
  • 24798 Views
Martin Hope
Matthias Braun
Asked: 2018-09-10 09:55:43 +0800 CST

使用 systemd 定期发送电子邮件

  • 1

我想使用systemd 计时器定期发送电子邮件以提醒我某些事情,例如周年纪念日或报税。

我用Mutt发送我的常规电子邮件;如果我可以重复使用它来发送自动电子邮件,而不必安装像Sendmail这样的其他软件,那就太好了。

systemctl --versionsystemd 239 说,我使用的是 Arch Linux 4.18.5 。

systemd mutt
  • 1 个回答
  • 763 Views
Martin Hope
Matthias Braun
Asked: 2018-08-27 03:22:28 +0800 CST

关机、挂起需要在安排时进行身份验证

  • 3

我想暂停我的笔记本电脑使用at:

echo "systemctl suspend" | at now + 5 minutes

暂停不会发生,而是我从atin找到一封邮件/var/spool/mail/me:

Failed to set wall message, ignoring: Interactive authentication required.
Failed to suspend system via logind: Interactive authentication required.
Failed to start suspend.target: Interactive authentication required.
See system logs and 'systemctl status suspend.target' for details.

好的,运行logind时需要身份验证。这很有趣,因为当我直接运行时,没有,不需要身份验证并且机器进入暂停状态。atsystemctl suspendsystemctl suspendat

我已确保使用 执行的命令与at直接使用echo "echo $(who) > who.txt" | at now.

怀疑需要身份验证,at因为它通过/bin/sh(这是 bash 的别名)运行命令,我systemctl suspend在启动后执行/bin/sh:挂起立即发生而无需身份验证,这表明嵌套 shell 不是使用at.

echo "reboot" | at now执行和时,我得到相同的行为和非常相似的邮件echo "shutdown now" | at now。

我的问题是:如何logind确定它at试图挂起、重新启动或关闭机器,我怎么知道logind它应该允许at在没有身份验证的情况下执行这些命令?


我在 Arch Linux 4.18.1 上,at版本为 3.1.19。

systemd at
  • 1 个回答
  • 2537 Views
Martin Hope
Matthias Braun
Asked: 2018-05-16 09:34:42 +0800 CST

在 .inputrc 键绑定中使用环境变量

  • 0

我想向 my 添加一个键绑定.inputrc,将环境变量的值USER, 放在命令行中。

我尝试了各种转义,但字符串$USER是逐字写入命令行的,而不是该环境变量的值。

$if mode=vi
  # Keymaps when we are in insert mode
  set keymap vi-insert

  # Insert path before mountpoint
  "C-e": "/run/media/$USER"

有没有一种合理的方法可以做到这一点,.inputrc或者我最好使用其他方式,比如.bashrc?

environment-variables arch-linux
  • 2 个回答
  • 531 Views
Martin Hope
Matthias Braun
Asked: 2018-01-28 08:26:09 +0800 CST

无法在目录上设置组 ID 位

  • 1

我创建了一个名为的目录newDir并更改了它所属的组mkdir newDir && chgrp test-group newDir。

me当我这样做时,我是用户。

调用stat newDir会产生预期的输出:

  File: newDir
  Size: 4096        Blocks: 8          IO Block: 4096   directory
Device: 801h/2049d  Inode: 10756102    Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1001/      me)   Gid: ( 1003/test-group)
Access: 2018-01-27 17:03:07.514864274 +0100
Modify: 2018-01-27 17:03:07.514864274 +0100
Change: 2018-01-27 17:05:08.317543163 +0100
 Birth: -

后来,以用户身份登录otherUser,我尝试在目录上设置组ID(setgid)权限位chmod g+s newDir。

令人失望的是,我看到stat权限没有改变。但是,我在 stderr 上没有错误,并且chmod命令的结果为 0,如echo $?.

为什么chmod g+s newDir没有效果?

我在 Arch Linux 4.14.13 上。

permissions setgid
  • 2 个回答
  • 2595 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve