so request handlers do not run concurrently unless the lock is explicitly released
using "with llfuse.lock_released:"'''
- def __init__(self, uid, gid, encoding="utf-8"):
+ def __init__(self, uid, gid, encoding="utf-8", set_executable_bit=False):
super(Operations, self).__init__()
self.inodes = Inodes()
self.uid = uid
self.gid = gid
self.encoding = encoding
+ self.set_executable_bit = set_executable_bit
# dict of inode to filehandle
self._filehandles = {}
entry.st_mode = stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH
if isinstance(e, Directory):
entry.st_mode |= stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH | stat.S_IFDIR
+ elif isinstance(e, StreamReaderFile) and self.set_executable_bit:
+ entry.st_mode |= stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH | stat.S_IFREG
else:
entry.st_mode |= stat.S_IFREG
parser.add_argument('--exec', type=str, nargs=argparse.REMAINDER,
dest="exec_args", metavar=('command', 'args', '...', '--'),
help="""Mount, run a command, then unmount and exit""")
+ parser.add_argument('--set-executable-bit', action='store_true', help="""Set executable bit on collection files""")
args = parser.parse_args()
args.mountpoint = os.path.realpath(args.mountpoint)
try:
# Create the request handler
- operations = Operations(os.getuid(), os.getgid(), args.encoding)
+ operations = Operations(os.getuid(), os.getgid(), args.encoding, args.set_executable_bit)
api = SafeApi(arvados.config)
usr = api.users().current().execute(num_retries=args.retries)