Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Unable to delete or edit Shared Folder

A shared folder was created in OS X Server with an "/" in the title. Example: "Music Song/Tracks", OS X Server created another shared folder named "Music Song/Tracks-1" and shared that folder. Now the problem is that I can not delete or edit either of these folder in OS X Server to take out the "/" character. Is there a Terminal command or process I can use to delete these folders, correct the folder name without the "/" and reshare the folder?

Xserve, OS X Mavericks (10.9.5), OS X Server 3.2.2

Posted on Apr 16, 2015 9:32 AM

Reply
3 replies

Apr 17, 2015 8:17 AM in response to jgraythe4th

First thing I would do is turn sharing off on the affected directory, then rename it:

unshare using the server.app then, rename the directory within terminal.app

mv /path/to/directory/Music\ Song\:Tracks /path/to/directory/MusicSongTracks


then reshare it.


-In terminal you'll need to escape *spaces* within file names with a \ *backslash* , then with / *forwardslash* you'd want to escape again and add a colon \:

d

Apr 18, 2015 11:09 AM in response to jgraythe4th

took me some time to debug this one.

Deleting the share via dscl . -delete does not work, even with all forms of escaping, while -list does work.


I Finally managed to delete the sharepoint by deleting the file /var/db/dslocal/nodes/Default/sharepoints/Music\ Song%2FTracks-1.plist

"rm /var/db/dslocal/nodes/Default/sharepoints/Music\ Song%2FTracks-1.plist "


might not me a very clean solution (sudo grep -R Music /var/db/dslocal still finds some files with content), but it deletes the share.

"sudo serveradmin settings sharing" shows, the share is gone


The clean solution in my opinion is like Linc says, restoring the service itself from backup.

Check you have a working Timemachine Backup, i didn't test this!

restore /var/db/dslocal-backup.xar from Timemachine from a date before you created that share

cd /var/db

mv dslocal dslocal.save && xar -xvf dslocal-backup.xar

You old configuration is kept in dslocal.save

Unable to delete or edit Shared Folder

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.