Skip to main content
1 of 3
chaos
  • 49.4k
  • 11
  • 128
  • 147

Just use the -w flag of the test utillity:

[ -w /path/to/file ] && echo "writeable" || echo "write permission denied" 
chaos
  • 49.4k
  • 11
  • 128
  • 147