[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse
Subject:    Re: [opensuse] running a program before shutdown
From:       Bernhard Voelker <mail () bernhard-voelker ! de>
Date:       2014-04-29 13:14:14
Message-ID: 535FA5A6.2010209 () bernhard-voelker ! de
[Download RAW message or body]

On 04/29/2014 02:53 PM, Benjamin wrote:
> I now did a chmod 777 Sync.sh and now the script works fine!

It's very rarely needed to use 'chmod 777' - especially if you are
not very familiar with these octal permission modes, then please
forget using 777: it makes the file readable, writable and executable
by the owner, the group and everyone else; you'll see this as "rwxrwxrwx"
in an "ls -l" listing.

So in your case, I'd probably at least do a "chmod go-w" on that
file for security reasons.

> Just beside:
> what is the difference between chmod 777 and chmod -x ?

Did you mean "chmod +x" instead? This would make the file executable.

> And must i
 > also run chmod as sudo if i make an script for me as a normal user
 > or does it suffice to run chmod as user?

root can change the permissions on any file, any normal user can
only change the permissions if she is the owner.

Further docs:
http://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html
http://www.gnu.org/software/coreutils/manual/html_node/File-permissions.html

Have a nice day,
Berny

-- 
To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse+owner@opensuse.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic