Can one of you super-users please help me by writing a simple chmod or whatever command to run in terminal, to change the permissions on a whole bunch of files, please?
On both my computers I have an adminsitrator account and a regular user account, the latter being the one I use all the time. I have just discovered that, having installed the latest version of Bookends that was tweaked to work with Nisus Writer Pro, all the format files have their permissions set to the administrator account only being able to read and write … the others are read only. This results in failure in scanning documents in Nisus to format the citations and produce the bibliography.
I can change them all manually to have read and write permissions, and have done so on the format file I’m using currently, but it’s laborious, as I have to open the information on each one, open the permissions pane, click the padlock to open it by entering the administrator name and password and then change the permissions.
If I knew the syntax for a terminal command to take all the files in the appropriate folder …/Bookends 10/Formats/. and change their permissions to Read & Write for “admin user”, “staff” and “everyone”, that would save a lot of time and effort.
It might be easier to chown (change owner) all the files to the correct UID. Problem here is that you need to first make sure that you have the same UID on both systems. Before I tell you how to verify this let us assume that the user name is MrX.
On each system:
id MrX
This will give you something like
mac:~ jaysen$ id jaysen
uid=502(jaysen) gid=502(jaysen) groups=502(jaysen),98(_lpadmin),81(_appserveradm),79(_appserverusr),80(admin)
mac:~ jaysen$
The like you care about is the UID. If they are both the same then you can do something like
Thanks, as ever. Actually these files are not shared between the two machines, fortunately, as for totally stupid reasons my user names are not identical on each. But they are located in the Bookends application folder on each installation.
As it happens, I found I was running into a serious database problem on the MBA and the best solution was simply to remove the app and all its supporting files and do a complete re-install — the actual database of references is on DropBox so that was not affected — so I got round this permissions problem on that one by re-installing into the Applications folder within my user account, rather than the system applications folder. After all, I’m the only one using the MBA. All seems to be working well now.
As for the MBP, I’ll look into your chowns. The files in question are all in a /Formats/ folder within the application folder; there’s nothing else within that folder. They don’t have a visible extension, but if I restrict it to that folder, presumably . will do the trick. One thing that I wonder is whether, having done that, next time repair permissions runs, it will set them all back to the original!
So, if I have any problems, I’ll do on the MBP as I have done on the MBA, and simply put the whole app into my user account.
Another way to accomplish this, which I prefer because it’s a bit more readable and avoids some of the odd punctuation required by the -exec option, is something like the following:
Being an “old” unix guy I remember when xargs wasn’t always handling special characters properly. That and there is an efficiency gain by not spawning the extra processes needed. This is irrelevant in todays systems with fast processor and single users but some habits die hard.
I remember those days, too. (I’ve been a “Unix gal” since the early 1990s). But the wonderful thing about Unix-based operating systems is that there’s almost always more than one way to do things, and we can pick the one that makes the most sense to us.