Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Posts
    1,461

    wget not working + can't chmod it

    Any ideas ?? Wget is not working + I can't chmod it (chmod is working for other files but not this one). Note: I did never chmod the file to 000 so it is real strange... Viewing the file with pico is possible. The partition is read/write and I can copy the file to wget2 and then it works but I can`t get the wget file to work:

    [email protected] [/usr/bin]# wget
    bash: /usr/bin/wget: Permission denied

    [email protected] [/usr/bin]# ls -l wget
    ---------- 1 root root 202772 Apr 13 06:07 wget

    [email protected] [/usr/bin]# chmod 700 wget
    chmod: changing permissions of `wget': Operation not permitted

    [email protected] [/usr/bin]# rm wget
    rm: remove write-protected regular file `wget'? y
    rm: cannot remove `wget': Operation not permitted

    [email protected] [/usr/bin]# mv wget wget2
    mv: cannot move `wget' to `wget2': Operation not permitted
      0 Not allowed!

  2. #2
    Join Date
    May 2002
    Location
    Moscow
    Posts
    1,490
    it may be have protected flag. you may check this by ls -lo /usr/bin/wget command
    for freebsd you should use chflags nochg (for example, but i recommend you read man chflags), for linux chattr -i
    Rustelekom LLC Dedicated server since 2002, RIPE NCC member, LIR, AS51168
      0 Not allowed!

  3. #3
    Join Date
    Aug 2004
    Posts
    1,461
    [email protected] [/usr/bin]# ls -lo /usr/bin/wget
    ---------- 1 root 202772 Apr 13 06:07 /usr/bin/wget


    Hm...Can't see anything that indicates it is portected.


    According to ls --help -o means "like -l, but do not list group information". Are you sure this is the right command ?

    I am using CentOS 3.5
    Last edited by thomas.smith; 07-30-2005 at 06:00 AM.
      0 Not allowed!

  4. #4
    Join Date
    May 2005
    Location
    Internet
    Posts
    42
    lsattr is the c ommand you;'re looking
    and chattr )

    Hope it will help 0

    adam
    Get Your wordpress blog at Blogsby! www.blogsby.com
      0 Not allowed!

  5. #5
    Join Date
    Aug 2004
    Posts
    1,461
    Hm... what does this mean:
    [email protected] [/usr/bin]# lsattr wget
    s---ia------- wget
      0 Not allowed!

  6. #6
    Join Date
    Aug 2004
    Posts
    1,461
    Yeah ! I got it fixed

    chattr -sia wget
    chmod 755 wget

    That did it...

    Thank you guys
      0 Not allowed!

  7. #7
    Join Date
    Jul 2001
    Location
    Singapore
    Posts
    1,790
    Glad you have solve your problem thus thread closed.
      0 Not allowed!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •