V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
302790951
V2EX  ›  Linux

软连接文件低权限如何修改

  •  
  •   302790951 · Jul 20, 2017 · 5853 views
    This topic created in 3212 days ago, the information mentioned may be changed or developed.

    实例文件: lrwxrwxrwx 2 root root test -> /usr/local/test_for_fun

    文件属于 root 用户,但是我是低权限用户,没有 sudo,有没有办法改变 test 连接的指向,或者删除掉连接,直接直接执行 test 文件

    1 replies    2017-07-20 23:54:24 +08:00
    raysonx
        1
    raysonx  
       Jul 20, 2017
    1. 有没有办法改变 test 连接的指向
    可以,因为它的权限是 777。
    可以尝试 ln -sTf 新的指向 软链接
    2. 删除掉连接
    不确定,要看对软链的上层目录有没有写权限
    3. 直接直接执行 test 文件
    不确定,要看对指向文件有没有读和执行的权限
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   965 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 22:26 · PVG 06:26 · LAX 15:26 · JFK 18:26
    ♥ Do have faith in what you're doing.