Opened 7 years ago

Closed 7 years ago

#1002 closed defect (fixed)

The release exporter should ignore directories and files that it has not permission to read

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: Reggie v4.13
Component: net.sf.basedb.reggie Keywords:
Cc:

Description (last modified by Nicklas Nordborg)

The release exporter is creating scripts for lining data files to files that already exists in earlier releases and for copying new files.

To be able to decide if a file should be linked or copied the exporter need to find out the files that already exists. It does this by executing several find commands. While this works fine in most cases there is a problem if the data folder has a directory that is not accessible by the current user. See the attached image.

It should be possible to write the find commands so that it ignore non-accessible files.

The first find command that is looking for directories could simply use the -executable filter to get rid of the permission issue.

The second find command that is looking for files we need to use something like:

-type d ! -executable -prune , -type f -readable

The first part (-type d ! -executable -prune) should exclude all directories that are not executable. The seconds part will then match all files that are readable.

Attachments (1)

permission-denied.png (68.5 KB ) - added by Nicklas Nordborg 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by Nicklas Nordborg, 7 years ago

Description: modified (diff)

by Nicklas Nordborg, 7 years ago

Attachment: permission-denied.png added

comment:2 by Nicklas Nordborg, 7 years ago

Description: modified (diff)

comment:3 by Nicklas Nordborg, 7 years ago

Status: newassigned

comment:4 by Nicklas Nordborg, 7 years ago

Resolution: fixed
Status: assignedclosed

(In [4625]) Fixes #1002: The release exporter should ignore directories and files that it has not permission to read

The suggested changes to the find commands seems to work.

Note: See TracTickets for help on using tickets.