Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

unable to change file permissions

Featured Replies

I have been using cron to run a couple of scripts and last week I got this error email:

cron for user root /boot/config/my_scripts/list_disks.sh

Console and webGui login account <xxxx.x.xxx3@gmail.com>
Mar 29, 2020, 4:00 AM (3 days ago)
to root, bcc: me

/bin/sh: /boot/config/my_scripts/list_disks.sh: Permission denied

Here is the relevant cron entry:

# run backup script on Home\ Video to copy to Backup1 every Sunday at 4am
0 4 * * 0 /boot/config/my_scripts/backup_home_video.sh
# run script to list individual disk contents
0 4 * * 0 /boot/config/my_scripts/list_disks.sh

 

I checked and, indeed,  the script file not longer has execute permission.

I attempted to add execute permission (sudo chmod +x list_disk.sh) but that failed silently.

root@Tower:/boot/config/my_scripts# ls -l
total 192
-rw------- 1 root root   640 Jan  6 11:30 backup_home_video.sh
-rw------- 1 root root   305 Jan 27 16:06 directory_size.sh
-rw------- 1 root root   717 Oct 29  2018 list_disks.sh
-rw------- 1 root root 85224 Jul 12  2018 test.sh

Any idea what caused this?  It has been working fine for over a year now.

Currently running 6.8.2

 

  • Community Expert

You cannot set the execute bit for files that are on the flash drive (this was a security change made a few releases ago).     The easiest way around this is to use the User Scripts plugin which will handle this for you.

  • Author
21 hours ago, itimpi said:

You cannot set the execute bit for files that are on the flash drive (this was a security change made a few releases ago).     The easiest way around this is to use the User Scripts plugin which will handle this for you.

Hmm.  I don't see why that would help security, but good to know.  I set up the scripts in user scripts and we'll see what happens.

Thanks.

  • 1 year later...

any idea then, how to make scripts executable in 

/boot/config/plugins/check_mk_agent/plugins

which is needed for custom checks to work?

 

my workaround is to create a (hidden) share called check_mk_plugins and symlink it

ln -s /mnt/user/check_mk_plugins /usr/lib/check_mk_agent/plugins

but I will probably need to add the symlink line to a startup script.

Edited by Osiris

  • Community Expert

The ability have executeable files on the flash was removed some Unraid releases ago as part of tightening security. 

 

another workaround is to precede the script name with ‘sh’ or ‘bash’.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.