Skip to content
Stephen Olander-Waters edited this page Aug 28, 2017 · 2 revisions

PrintToBox is a tool to upload content from servers to Box.com. It leverages the Box Java SDK to upload and share content with users. PrintToBox gives away ownership of the folder to the target user so the disk usage is tabulated against the user and so the user has complete control over the folder.

The README has more information about the initial installation and configuration of PrintToBox.

Use Cases

Cron

Upload cron output to a particular user who can share the folder as they see fit

Banner

Select the BOX printer to print all job output to Box.com. Caveat: User needs to add the ".txt" file extension to most uploaded files in order to view them

Caution

The user submitting the process that calls PrintToBox has to be a member of the Linux group 'printtobox'.

The folder namespace is global for the the PrintToBox AppUser. I.e., the collaborated folders it creates all exist in the root folder. Best practice: Use very unique folder names. Bad folder name: Uploads. Good folder name: Finance Custom Cron Output.

FAQ

Why did PrintToBox get this error: "Item with the same name already exists"

The service account, PrintToBoxAppUser, that runs PrintToBox does not have admin privileges and will not squash your data. If you have a collaborated folder that is not shared with PrintToBoxAppUser or it doesn't have Editor permissions, then the upload will fail. That way, if you have a folder "Important Stuff" shared with your grandma and I want to upload to it with PrintToBox and don't know that, it won't nuke your stuff from orbit.

This is just how Box works. It's the same if you try to give away ownership of a folder to someone else and they already have one with the same name.

Why does it give away ownership?

Because that's how the bytes are tracked — by folder owner. Otherwise, the service account gigabytes would grow unabated, which costs money. In addition, users know better than us what to keep and what to toss.

Troubleshooting

  • PrintToBox to a different folder name.
  • Or, rename your personal folder to something else. Execute PrintToBox. Then, migrate content from the personal to the shared folder.
  • Or, add the AppUser as a collaborator to the folder. Use PrintToBox -I to get the email address of the AppUser and add that as a collaborator and it will work.