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.

newperms path with space causes line 21 error.

Featured Replies

root@storage:~# newperms /mnt/user/downloads/Folder\ 5/
/mnt/user/downloads/Folder 5/
/usr/local/sbin/newperms: line 21: [: /mnt/user/downloads/Folder: binary operator expected
completed, elapsed time: 00:00:00
root@storage:~# newperms /mnt/user/downloads/Folder\ 5/
/mnt/user/downloads/Folder 5/
processing /mnt/user/downloads/Folder 5/
... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/user/downloads/Folder 5/
... chown -R nobody:users /mnt/user/downloads/Folder 5/
... sync
completed, elapsed time: 00:00:02

 

Wrapping $1 on line 21 seems to fix this.

 

if [ -d $1 ] ; then

if [ -d "$1" ] ; then

 

I found this issue because despite the major change, I still constantly fight with permissions and constantly have to use newperms.

  • 3 months later...

This is still an issue.  Here is a bug report in the preferred format, if that helps:

 

unRAID OS Version:

6.1.7.  Based on the date of the original report, it was introduced in 6.1.3 or earlier.

 

Description:

newperms does not work on directories with spaces in the name

 

How to reproduce:

call newperms on a directory with spaces

newperms /mnt/user/share/directory with spaces/

 

Expected results:

the permissions on the files in the directory would be changed

 

Actual results:

/usr/local/sbin/newperms: line 21: [: too many arguments

 

Other information:

Line 21 is:

  if [ -d $1 ] ; then

but it should be:

  if [ -d "$1" ] ; then

All of the other instances of $1 in the script are already surrounded by quotes.

Archived

This topic is now archived and is closed to further replies.

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.