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.

[SOLVED] Cannot delete an Empty User Share (rc12)

Featured Replies

I am tidying up my server and deleting some of my ISO disc images now that I have them as MKVs. I have emptied two user shares "VideoSD-FitnessISO" and "VideoSD-TVSeriesISO". I have checked with 'ls', midnight commander and browsing to the shares with Windows Explorer and they are empty.

 

On the unRaid web page where all shares are listed. If I click on 'Compute" it correctly shows the shares as being 0 size

 

However when I view the specific Shares in the "Shares" web page on Unraid the "Share empty?" = "No" and I am therefore unable to delete the share as there is no 'Delete' button being displayed.

 

Both of these Shares are on HDDs that have other Shares on them. i.e. the HDD has content on it in the other Shares, but the Share I am trying to delete is empty.

 

Any thoughts? Can anyone confirm if this is a bug?

 

TheWombat

Check for hidden files

  • Author

"ls -a" shows only "./" and "../" so doesn't appear to be any hidden files.

 

TheWombat

 

Just to be sure: do a SHIFT-RELOAD of the shares webpages you use to make sure the gui is not reporting something wrong..

 

Big hammer approach is to just delete the shares via console..

I've had this happen a couple of times - deleted the share from the console, back into the UI, the share still appears to be there.. click on it, it says the share is deleted, all is well.

  • Author

Thanks for the suggestions. Shift-Reload made no difference.

 

I'm hoping Tom will see this post and respond and if need be I can do some further checks for him. If others have had this issue then it does indeed seem like there is a bug.

 

TheWombat

 

Thanks for the suggestions. Shift-Reload made no difference.

 

I'm hoping Tom will see this post and respond and if need be I can do some further checks for him. If others have had this issue then it does indeed seem like there is a bug.

 

TheWombat

 

At the top of the file /usr/local/emhttp/plugins/webGui/ShareEdit.php there's this function:

 

/* check for empty share */
   function shareEmpty($name) {
      return (($files = @scandir('/mnt/user/' . $name)) && (count($files) <= 2));
   }

 

This checks if the share directory is empty.  I don't see how this can fail, but notice the '@' symbol in front of the scandir() function?  That turns off error reporting during the function call.  I don't recall why I did that, but you might try editing the file and removing it.  Then refresh the share page and see if PHP spits out any messages to the console.  Also you can check the share yourself by typing:

 

ls -a /mnt/user/name    [if name has no spaces]

or

ls -a "/mnt/user/share name"  [if name has spaces]

 

If you see anything besides "./" and "../" show up, share is not empty.

  • Author

Tom,

 

I'm getting a lot of errors on the console screen about undefined constants etc. Once the preclear I am running completes I will reboot and check whether it fixes itself. I don't believe I would have done anything to cause this but who knows.

 

DSC045621280x960_zps8ac4f893.jpg

 

 

thanks and I will post an update at the weekend.

 

TheWombat

I had this problem the other day. I just deleted the share folder itself from /mnt/user/ in a terminal session and then deleted it from the web gui.

  • Author

I have no idea what was causing the underlying issue which resulting in a lot of debug errors on the console screen about constants etc not being set.

 

I removed unmenu and all packages and rebooted and now all seems to be working fine - no more debug messages and also I can now delete empty shares.

 

I will now reinstall my packages and see if any further issues.

 

Thanks

 

TheWombat

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.