4

I use fossil to keep my shell script. But If I check in it and use it cross Windows & Linux, then the executable permission is missing of my shell script. How to add it back like svn's property setting?

Daniel YC Lin
  • 15,050
  • 18
  • 63
  • 96
  • Last time I looked into this I only found indications that it is not possible. But then the only documentation about permissions I have found is [this post](http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg00939.html). [A search on the mailinglist](http://www.mail-archive.com/search?q=%22file+permissions%22&l=fossil-users%40lists.fossil-scm.org) suggests that this is still the case. Someone with a deeper understanding of fossil may explain how this is a feature (most things in fossil are designed in favour of less complexity instead of more features). – FvD May 01 '13 at 21:57

1 Answers1

1

As documented here. A manifest F-card (a file that's part of the check in) has up to four arguments. The (optional) third argument defines special access permissions associated with the file. If the letter 'x' is specified on this third argument then the file is defined as executable. Try setting the permissions of the file to executable:

chmod u+x,g+x,o+x myscript.sh

Then check the script in (you may have to modify it a bit, add a comment etc..). The script should be saved with it's executable bit sent in it's F-card entry the manifest. When it's checked out (on Linux) the executable bit should be set. Try not to modify and check-in the scripts on Windows or other file system that doesn't support Unix permissions.

David H. Bennett
  • 1,822
  • 13
  • 16