Linux/UNIX: chmod error

Q: Sometime when I use chmod command under Suse Linux, I am getting following error message:
changing permissions of ‘FILENAME’: Operation not permitted

ADVERTISEMENTS

A: If you are using UNIX you will get error as follows:
chmod: Not owner.

Remember, only the owner of a file or directory can set its permissions. Use ls -l to find the owner. Otherwise, login in as a root user and then setup permissions using chmod.

See also:

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
2 comments… add one
  • sanjay Nov 20, 2007 @ 15:20

    how i can change the permission of a complete directory.
    and how i remove the whole directory

  • 🐧 nixCraft Nov 20, 2007 @ 15:48

    How can I change the permission of a complete directory.
    chmod -R perm dir-name

    how can i remove the whole directory
    /bin/rm -rf dirname

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.