Page 1 of 4

Permissions for /var/hda/files

Posted: Thu Sep 27, 2012 9:02 pm
by apastor
Hey Guys

Anyone know what the default permissions should be for /var/hda/files

I only have read access to the files there.

When I check the access for folders and shares they are all "first_account_created | users"
In my HDA, I have read and write access to the share. So im guessing its the permission that are throwing things off

Also, the public folder is not writable either.

Any assistance is greatly appreciate

Re: Permissions for /var/hda/files

Posted: Thu Sep 27, 2012 9:14 pm
by radioz
Are you having problems when accessing files from a client computer, or when logged directly into your hda?

While logged into your hda, all the share directories in /var/hda/files (and the files they contain) should have permissions set to <first user account>:users.

When accessing your shares from a client computer, the permissions are set by the HDA Dashboard (in Setup/Shares).

Let us know if you have any questions.

Re: Permissions for /var/hda/files

Posted: Thu Sep 27, 2012 10:59 pm
by apastor
Are you having problems when accessing files from a client computer
I can access the files, but can not delete.
While logged into your hda, all the share directories in /var/hda/files (and the files they contain) should have permissions set to <first user account>:users.
That is what they are set to right now

BUt i have found the issue. The /var/hda/files was set to 755. I changed it to 775, and now I have full access to the shares.

Re: Permissions for /var/hda/files

Posted: Fri Sep 28, 2012 6:28 am
by bigfoot65
Was this a problem after install? Just trying to determine if this could be a bug.

Re: Permissions for /var/hda/files

Posted: Fri Sep 28, 2012 7:12 am
by apastor
I'm guessing so. I never touched or looked at that until now. Once I changed it I was able to access my files with write acres. But what is odd is that no one has mentioned it yet.

[ Post made via Android ] Image

Re: Permissions for /var/hda/files

Posted: Fri Sep 28, 2012 7:48 am
by bigfoot65
That is my point. Wondering if its an isolated incident. Guess we will have to see if anyone else complains.

Re: Permissions for /var/hda/files

Posted: Fri Sep 28, 2012 11:22 am
by jiml
This is how I fix all my hda/files permissions.

Code: Select all

#!/bin/bash echo Setting all directories in /var/hda/files hierarchy to be readable find /var/hda/files/*/ -type d -exec chmod 777 {} \; echo Setting all files in /var/hda/files hierarchy to read/write find /var/hda/files/*/ -type f -exec chmod 666 {} \; echo Setting all files in /var/hda/files/Music hierarchy to user jiml and group users find /var/hda/files/Music/ -type f -exec chown jiml:users {} \; echo Setting all directories in /var/hda/files/Music hierarchy to user jiml and group users find /var/hda/files/Music/ -type d -exec chown jiml:users {} \; echo HDA permissions fixed

Re: Permissions for /var/hda/files

Posted: Fri Sep 28, 2012 7:33 pm
by bigfoot65
Nice script. Would you mind adding it to the wiki? Also why 666 got files? We typically do 775 on directory and files.

Re: Permissions for /var/hda/files

Posted: Sat Sep 29, 2012 3:22 am
by jiml
I will add it to the wikki. I've also amended it so it is faster by testing the file perms and only changing those files that need changing.

As for the why 666 as there are no files that require the execute perms in the files/hda directory I just don't bother to set it.

666 -rw-rw-rw- 1 jiml jiml 0 Sep 12 17:59 test # File are rw for everbody and not set as executable

775 -rwxrwxr-x 1 jiml jiml 0 Sep 12 17:59 test # Files are rw only for user and group, ro for everybody else. Set as executable.

Re: Permissions for /var/hda/files

Posted: Sat Sep 29, 2012 5:29 am
by bigfoot65
That is true, never thought of it that way. The reason we set the executable permissions as some store files they execute in shares. If all you need is to read/write, then yes it's not necessary. However if you store scripts or programs to be run from a share, that would be needed.