How to set up permissions to change a /sys/kernel/config/ folder?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have an unusual problem and I'm not familiar enough with Linux permissions to solve it myself.
I've been given a bash script that creates a new folder inside /sys/kernel/config/usb_gadget
, then to create other folders and files inside it. Without being root, this isn't allowed.
I tried using chmod
to give my user full access to the usb_gadget folder, but:
- This resets when the machine is rebooted.
- My user can create a folder inside usb_gadget, but that folder doesn't give me sufficient permissions.
Ideal
Only my user can create a folder only with name myfolder
inside usb_gadget. Within that folder, the user can do whatever they need to do. Even better, certain elements of that folder are also preset and the user cannot do anything with those either.
Or, give my user the ability only to run the bash script, and the bash script the ability to make the changes it needs as sudo.
What's a smart way to go about this that doesn't take an axe to security?
debian permissions security
add a comment |Â
up vote
0
down vote
favorite
I have an unusual problem and I'm not familiar enough with Linux permissions to solve it myself.
I've been given a bash script that creates a new folder inside /sys/kernel/config/usb_gadget
, then to create other folders and files inside it. Without being root, this isn't allowed.
I tried using chmod
to give my user full access to the usb_gadget folder, but:
- This resets when the machine is rebooted.
- My user can create a folder inside usb_gadget, but that folder doesn't give me sufficient permissions.
Ideal
Only my user can create a folder only with name myfolder
inside usb_gadget. Within that folder, the user can do whatever they need to do. Even better, certain elements of that folder are also preset and the user cannot do anything with those either.
Or, give my user the ability only to run the bash script, and the bash script the ability to make the changes it needs as sudo.
What's a smart way to go about this that doesn't take an axe to security?
debian permissions security
/sys
is included in ths OS as a virtual filesystem(sysfs) which is a ram-based filesystem. It gets rebuilt at each reboot. Which is why your permissions are changed after each reboot.
â Jaken551
Apr 11 at 7:29
@Jaken551 In that case, is there a secure way to alter these permissions after /sys is set up? Plus, this doesn't seem to change the fact that even with all permissions, my user can create a subfolder but isn't given permissions to that folder either.
â sscirrus
Apr 11 at 16:01
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have an unusual problem and I'm not familiar enough with Linux permissions to solve it myself.
I've been given a bash script that creates a new folder inside /sys/kernel/config/usb_gadget
, then to create other folders and files inside it. Without being root, this isn't allowed.
I tried using chmod
to give my user full access to the usb_gadget folder, but:
- This resets when the machine is rebooted.
- My user can create a folder inside usb_gadget, but that folder doesn't give me sufficient permissions.
Ideal
Only my user can create a folder only with name myfolder
inside usb_gadget. Within that folder, the user can do whatever they need to do. Even better, certain elements of that folder are also preset and the user cannot do anything with those either.
Or, give my user the ability only to run the bash script, and the bash script the ability to make the changes it needs as sudo.
What's a smart way to go about this that doesn't take an axe to security?
debian permissions security
I have an unusual problem and I'm not familiar enough with Linux permissions to solve it myself.
I've been given a bash script that creates a new folder inside /sys/kernel/config/usb_gadget
, then to create other folders and files inside it. Without being root, this isn't allowed.
I tried using chmod
to give my user full access to the usb_gadget folder, but:
- This resets when the machine is rebooted.
- My user can create a folder inside usb_gadget, but that folder doesn't give me sufficient permissions.
Ideal
Only my user can create a folder only with name myfolder
inside usb_gadget. Within that folder, the user can do whatever they need to do. Even better, certain elements of that folder are also preset and the user cannot do anything with those either.
Or, give my user the ability only to run the bash script, and the bash script the ability to make the changes it needs as sudo.
What's a smart way to go about this that doesn't take an axe to security?
debian permissions security
edited Apr 10 at 20:55
asked Apr 10 at 20:48
sscirrus
1484
1484
/sys
is included in ths OS as a virtual filesystem(sysfs) which is a ram-based filesystem. It gets rebuilt at each reboot. Which is why your permissions are changed after each reboot.
â Jaken551
Apr 11 at 7:29
@Jaken551 In that case, is there a secure way to alter these permissions after /sys is set up? Plus, this doesn't seem to change the fact that even with all permissions, my user can create a subfolder but isn't given permissions to that folder either.
â sscirrus
Apr 11 at 16:01
add a comment |Â
/sys
is included in ths OS as a virtual filesystem(sysfs) which is a ram-based filesystem. It gets rebuilt at each reboot. Which is why your permissions are changed after each reboot.
â Jaken551
Apr 11 at 7:29
@Jaken551 In that case, is there a secure way to alter these permissions after /sys is set up? Plus, this doesn't seem to change the fact that even with all permissions, my user can create a subfolder but isn't given permissions to that folder either.
â sscirrus
Apr 11 at 16:01
/sys
is included in ths OS as a virtual filesystem(sysfs) which is a ram-based filesystem. It gets rebuilt at each reboot. Which is why your permissions are changed after each reboot.â Jaken551
Apr 11 at 7:29
/sys
is included in ths OS as a virtual filesystem(sysfs) which is a ram-based filesystem. It gets rebuilt at each reboot. Which is why your permissions are changed after each reboot.â Jaken551
Apr 11 at 7:29
@Jaken551 In that case, is there a secure way to alter these permissions after /sys is set up? Plus, this doesn't seem to change the fact that even with all permissions, my user can create a subfolder but isn't given permissions to that folder either.
â sscirrus
Apr 11 at 16:01
@Jaken551 In that case, is there a secure way to alter these permissions after /sys is set up? Plus, this doesn't seem to change the fact that even with all permissions, my user can create a subfolder but isn't given permissions to that folder either.
â sscirrus
Apr 11 at 16:01
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f436863%2fhow-to-set-up-permissions-to-change-a-sys-kernel-config-folder%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
/sys
is included in ths OS as a virtual filesystem(sysfs) which is a ram-based filesystem. It gets rebuilt at each reboot. Which is why your permissions are changed after each reboot.â Jaken551
Apr 11 at 7:29
@Jaken551 In that case, is there a secure way to alter these permissions after /sys is set up? Plus, this doesn't seem to change the fact that even with all permissions, my user can create a subfolder but isn't given permissions to that folder either.
â sscirrus
Apr 11 at 16:01