Error in "Tools for OS X" wiki? Moving data folder doesn't work for external drives

Message boards : Questions and problems : Error in "Tools for OS X" wiki? Moving data folder doesn't work for external drives
Message board moderation

To post messages, you must log in.

AuthorMessage
Dave

Send message
Joined: 21 Nov 14
Posts: 4
United States
Message 58007 - Posted: 21 Nov 2014, 23:23:59 UTC

Hi,
I would like to move my BOINC app and BOINC Data folders onto a RAM disk. BOINC runs fine with the Data folder in my root library's Application Support folder (default install location). When I go through the steps on the Tools for OS X wiki, I move the BOINC Data folder to the RAM disk, create the symbolic link in the root library, and run the Mac_SA_Secure.sh on the new folder on the RAM disk. When I restart BOINC, I get the following error: BOINC ownership or permissions are not set properly; please reinstall BOINC. (Error code -1022). I have tried reinstalling multiple times and redoing the folder move as well.

To test further, I tried just moving the BOINC Data folder from its default location in my root library to another spot on my SSD. This time BOINC worked fine after going through the setup steps. So the wiki is correct for folder moves on the startup drive.

I then tried on an external firewire raid drive. Same errors as the RAM disk. So this issue doesn't seem to be that I'm trying to use a RAM disk, rather that something is incorrect (probably in Mac_SA_Secure.sh) when it deals with external volumes. I don't get any error messages when running the script, for all intents and purposes it looks the same as when it runs successfully. Unfortunately this is the extent of my knowledge when it comes to things like this.

Any help would be greatly appreciated!

Dave

Mac OS X 10.9.3
3.4GHz Intel i7
32GB RAM
BOINC 7.2.42 (latest version that works with World Community Grid)
ID: 58007 · Report as offensive
Profile Gary Charpentier
Avatar

Send message
Joined: 23 Feb 08
Posts: 2463
United States
Message 58013 - Posted: 22 Nov 2014, 2:14:56 UTC - in response to Message 58007.  

Hi,
I would like to move my BOINC app and BOINC Data folders onto a RAM disk. BOINC runs fine with the Data folder in my root library's Application Support folder (default install location). When I go through the steps on the Tools for OS X wiki, I move the BOINC Data folder to the RAM disk, create the symbolic link in the root library, and run the Mac_SA_Secure.sh on the new folder on the RAM disk. When I restart BOINC, I get the following error: BOINC ownership or permissions are not set properly; please reinstall BOINC. (Error code -1022). I have tried reinstalling multiple times and redoing the folder move as well.

To test further, I tried just moving the BOINC Data folder from its default location in my root library to another spot on my SSD. This time BOINC worked fine after going through the setup steps. So the wiki is correct for folder moves on the startup drive.

I then tried on an external firewire raid drive. Same errors as the RAM disk. So this issue doesn't seem to be that I'm trying to use a RAM disk, rather that something is incorrect (probably in Mac_SA_Secure.sh) when it deals with external volumes. I don't get any error messages when running the script, for all intents and purposes it looks the same as when it runs successfully. Unfortunately this is the extent of my knowledge when it comes to things like this.

Any help would be greatly appreciated!

Dave

Mac OS X 10.9.3
3.4GHz Intel i7
32GB RAM
BOINC 7.2.42 (latest version that works with World Community Grid)

I do not believe with Apple's sandbox in their latest versions that it is easy to move the application from the root drive. Apple intentionally does not mount any drive except the root drive with permissions to execute files. I believe with the proper commands it is possible to remount a drive with those permissions enabled, but it is not something I have done. You should be able to move the data to any place you like though.
ID: 58013 · Report as offensive
Dave

Send message
Joined: 21 Nov 14
Posts: 4
United States
Message 58028 - Posted: 22 Nov 2014, 6:40:20 UTC - in response to Message 58013.  

Good point Gary. I wondered if the issue was around sandboxing and moving the app, so I tried it all just moving the BOINC Data folder. It was still a no go and ran into the same problem. I can move the data folder anywhere on the same drive and it works fine. Moving it to an external gives me an error. The Tools for OS X wiki does mention sandboxing, so I am assuming that it takes that into account but I really don't know.
ID: 58028 · Report as offensive
Richard Haselgrove
Volunteer tester
Help desk expert

Send message
Joined: 5 Oct 06
Posts: 5080
United Kingdom
Message 58031 - Posted: 22 Nov 2014, 9:35:51 UTC - in response to Message 58013.  

I do not believe with Apple's sandbox in their latest versions that it is easy to move the application from the root drive. Apple intentionally does not mount any drive except the root drive with permissions to execute files. I believe with the proper commands it is possible to remount a drive with those permissions enabled, but it is not something I have done. You should be able to move the data to any place you like though.

Don't forget that BOINC treats project executable files as data, and stores/executes them in/from the data folder.
ID: 58031 · Report as offensive
Profile Gary Charpentier
Avatar

Send message
Joined: 23 Feb 08
Posts: 2463
United States
Message 58046 - Posted: 22 Nov 2014, 15:58:03 UTC - in response to Message 58031.  

I do not believe with Apple's sandbox in their latest versions that it is easy to move the application from the root drive. Apple intentionally does not mount any drive except the root drive with permissions to execute files. I believe with the proper commands it is possible to remount a drive with those permissions enabled, but it is not something I have done. You should be able to move the data to any place you like though.

Don't forget that BOINC treats project executable files as data, and stores/executes them in/from the data folder.

Ah, correct, so you would have to remount the drive with execute permissions enabled.
ID: 58046 · Report as offensive
Dave

Send message
Joined: 21 Nov 14
Posts: 4
United States
Message 58056 - Posted: 22 Nov 2014, 21:13:03 UTC - in response to Message 58046.  

Ok, sounds like some good diagnostic progress. Forgive me for sounding dumb in my response...

I googled how to set up the execute permissions on an external drive. The best I came up with was to open it up as the least secure option. So I tried it.

cd {external drive}
sudo chmod -R -v 777 *

I used ls -al to confirm that the external drive and all files/folders on it all had read/write/execute permissions enabled and they do.

I thought this would open the drive up to be used by anyone/anything. Unfortunately, it still left me with the same permissions error.

Is there a better/correct way to remount the drive with execute permissions enabled?
ID: 58056 · Report as offensive
Profile Gary Charpentier
Avatar

Send message
Joined: 23 Feb 08
Posts: 2463
United States
Message 58068 - Posted: 23 Nov 2014, 5:06:11 UTC - in response to Message 58056.  

Ok, sounds like some good diagnostic progress. Forgive me for sounding dumb in my response...

I googled how to set up the execute permissions on an external drive. The best I came up with was to open it up as the least secure option. So I tried it.

cd {external drive}
sudo chmod -R -v 777 *

I used ls -al to confirm that the external drive and all files/folders on it all had read/write/execute permissions enabled and they do.

I thought this would open the drive up to be used by anyone/anything. Unfortunately, it still left me with the same permissions error.

Is there a better/correct way to remount the drive with execute permissions enabled?

Yes it will. The volume is mounted without execute permission and even root can't get around that. That is the snadbox!

you need to "unmount" and then "mount" the volume with permissions.
Apple specifies -o noexec,nosuid by default on the automatic mount [via "diskutil"]. You may also need to change ownership of the volume using "diskutil" and/or enable owners.

read the manual pages for each of these commands.

getting permissions right, by hand, is a tricky thing.
ID: 58068 · Report as offensive
Dave

Send message
Joined: 21 Nov 14
Posts: 4
United States
Message 58095 - Posted: 24 Nov 2014, 7:30:44 UTC - in response to Message 58068.  
Last modified: 24 Nov 2014, 7:44:59 UTC

Ok, got it (mostly). Thanks for all of your help!!!

The problem is indeed that the volume is mounted without execute permission. The easy way to see this is to look at the volume in Disk Utility. There is a line that says "Owners Enabled: No." As long as it isn't enabled it won't work. You don't have to mount/unmount the drive to correct this, so it turns out it is easier than we thought.

Type the following: sudo /usr/sbin/vsdbutil -a /Volumes/{external drive}

Use Disk Utility to verify that now Owners Enabled is set to yes. Once it is yes, then you can run BOINC with the Data folder on the external drive (or on a RAM Disk as in my case).

The reason I only have it mostly working is that I still can't get it to run if I have the BOINCManager.app on the RAM Disk as well. The app opens fine, but it never seems to actually load any data. But, assuming I'm correct in thinking that the real work being done is done inside the BOINC Data folder, there isn't any real harm in keeping the BOINCManager app in its default location.

Thanks again for all of your great help and patient explanations :-)!
ID: 58095 · Report as offensive

Message boards : Questions and problems : Error in "Tools for OS X" wiki? Moving data folder doesn't work for external drives

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.