[xubuntu-users] Marking a text file as executable

Victor Forberger vforberger at fastmail.fm
Wed May 24 00:26:25 UTC 2017

On 05/23/2017 06:46 PM, John R. Sowden wrote:
> I have a text file that appears to be a script to run an acct app.  I
> cannot execute it, and it shows in the file manager as a 'plain text file'.
> Right clicking on properties then permissions, there is no check box for
> 'make executable'.
> The text file starts with #! /usr/bin/wish
> How do make this file executable? I tried on a root file manager, no
> change.  The files is owned by me for r/w/.
> John

Use the chmod terminal command:

make bin file executable
sudo chmod a+x yourbinfile.bin

run bin file
sudo ./yourbinfile.bin # runs as root

chmod +rwx file # will restore the permission of the file file to
default: -rwxr-xr-x.

cdmod -R OPTION FILE # recursive

chmod 777 FILE # change the permissions of the file to read, write, and
execute for all.

chmod 664 FILE # sets read and write and no execution access for the
owner and group, and read, no write, no execute for all others.

Locking a directory
For privacy of my data I wanted to lock down /downloads on my file
server. So I ran:

chmod 0000 /downloads

The root user still has access and ls and cd commands will not work. To
go back:

chmod 0755 /downloads

- Victor

Victor Forberger
vforberger at fastmail.fm
blog: http://linuxatty.wordpress.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/xubuntu-users/attachments/20170523/4c77af19/attachment.sig>

More information about the xubuntu-users mailing list