Assign read/write permission to all users for unzipped custom model files and folders

This is a short blog post about assigning read/write permissions for all users to unpacked "custom model files and folders".

Here is an example of an unpacked model archive with files and folders.

cd ensemble_model
ls -l

  • Example output:
drwxrwx---   4 thomassuedbroecker  staff  128  3 Feb 20:59 cnn_model
-rw-rw----   1 thomassuedbroecker  staff  685  3 Feb 20:59 config.yml
drwxrwx---   3 thomassuedbroecker  staff   96  3 Feb 20:59 ensemble_model
drwxrwx---   4 thomassuedbroecker  staff  128  3 Feb 20:59 stopwords
drwxrwx---   3 thomassuedbroecker  staff   96  3 Feb 20:59 syntax_model
drwxrwx---   4 thomassuedbroecker  staff  128  3 Feb 20:59 tf_idf_model
drwxrwx---   4 thomassuedbroecker  staff  128  3 Feb 20:59 tf_idf_svm_model
drwxrwx---   4 thomassuedbroecker  staff  128  3 Feb 20:59 use_model
drwxrwx---   4 thomassuedbroecker  staff  128  3 Feb 20:59 use_svm_model

The following tables provide a brief overview of how to interpret the above content.

  • Table of access rights permissions (rwx).
TypereadwriteexecutionNo Permission
Numerical4210
Lettersrwx
  • Table of types
TypeLetters
Folderd
File
drwxrwx---   4 thomassuedbroecker  staff  128  3 Feb 20:59 use_svm_model
 [-][-][-]     [-----------------] [---]  [---]
  |  |  |       |                   |      |
  |  |  |       |                   |      +-------- Size of the directory
  |  |  |       |                   +-----------> Group
  |  |  |       +-------------------> Owner
  |  |  |
  |  |  +---- All users rights
  |  +----- Group rights
  +----- Owner rights

We will use the chmod command to change the permission.

ParmeterPermission
u+user permissions
g+group permissions
a+all users permissions
-Rrecursive
sudo chmod -R a+rw- .
              | |||
              | ||+----- assign no execution permission
              | |+----- assign write permission
              | +----- assign read permission
              +------ assign all users permissions

  • Example result:
ls
total 8
drwxrwxrw-  4 thomassuedbroecker  staff  128  3 Feb 20:59 cnn_model
-rw-rw-rw-  1 thomassuedbroecker  staff  685  3 Feb 20:59 config.yml
drwxrwxrw-  3 thomassuedbroecker  staff   96  3 Feb 20:59 ensemble_model
drwxrwxrw-  4 thomassuedbroecker  staff  128  3 Feb 20:59 stopwords
drwxrwxrw-  3 thomassuedbroecker  staff   96  3 Feb 20:59 syntax_model
drwxrwxrw-  4 thomassuedbroecker  staff  128  3 Feb 20:59 tf_idf_model
drwxrwxrw-  4 thomassuedbroecker  staff  128  3 Feb 20:59 tf_idf_svm_model
drwxrwxrw-  4 thomassuedbroecker  staff  128  3 Feb 20:59 use_model
drwxrwxrw-  4 thomassuedbroecker  staff  128  3 Feb 20:59 use_svm_model

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: