You are not logged in.

#1 2021-10-07 01:37:23

gmariz
Member
Registered: 2021-03-21
Posts: 9

Having troubles with chroot when trying to make scripts executable

Hi!
So as the title sugests I've been having troubles with chroot when using chroot +x "filename"
Here is the output:

doas chroot +x /bin/music
chroot: cannot change root directory to '+x': No such file or directory

That happens with any file i try to use it on.
Here is what is on the file:

#!/bin/sh
#script to run videos from dmenu

cd "/home/gustavo/Música" && mpv "$(ls | dmenu -l 7)"

I have done some research using duckduckgo but i have not seen anyone comment on this issue yet, so i hope someone from here might know the answer.

ps: sorry if there are any spelling mistakes i'm not really used to english and it's a bit late


Hallo!

Offline

#2 2021-10-07 01:44:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Having troubles with chroot when trying to make scripts executable

You mean to use chmod, not chroot?

Offline

#3 2021-10-07 06:35:38

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,671
Website

Re: Having troubles with chroot when trying to make scripts executable

As Scimmia already suggested, chroot is there to change the root directory of your current shell environment. On the other hand chmod is there to change the file modes such as the read, write and execute flags. The latter is obviously what you want to do. You can almost always find help on any command via

man <command>

Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#4 2021-10-07 11:43:19

gmariz
Member
Registered: 2021-03-21
Posts: 9

Re: Having troubles with chroot when trying to make scripts executable

yup it was exactly that for some reason i was using chroot instead of chmod. Thank you both!


Hallo!

Offline

#5 2021-10-07 12:28:52

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Having troubles with chroot when trying to make scripts executable

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB