Permissions for /var/hda/files

apastor
Posts: 175
Joined: Fri Jan 14, 2011 6:58 am

Permissions for /var/hda/files

Postby apastor » Thu Sep 27, 2012 9:02 pm

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
Proxmox Server: Currently Not Running Amahi
CPU: AMD FX 6100 Six Core
RAM: 8GB DDR3
HDD: 4x1TB RAID10 (Adaptec)

User avatar
radioz
Posts: 406
Joined: Tue Nov 24, 2009 1:07 pm

Re: Permissions for /var/hda/files

Postby radioz » Thu Sep 27, 2012 9:14 pm

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.

apastor
Posts: 175
Joined: Fri Jan 14, 2011 6:58 am

Re: Permissions for /var/hda/files

Postby apastor » Thu Sep 27, 2012 10:59 pm

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.
Proxmox Server: Currently Not Running Amahi
CPU: AMD FX 6100 Six Core
RAM: 8GB DDR3
HDD: 4x1TB RAID10 (Adaptec)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Permissions for /var/hda/files

Postby bigfoot65 » Fri Sep 28, 2012 6:28 am

Was this a problem after install? Just trying to determine if this could be a bug.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

apastor
Posts: 175
Joined: Fri Jan 14, 2011 6:58 am

Re: Permissions for /var/hda/files

Postby apastor » Fri Sep 28, 2012 7:12 am

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
Proxmox Server: Currently Not Running Amahi
CPU: AMD FX 6100 Six Core
RAM: 8GB DDR3
HDD: 4x1TB RAID10 (Adaptec)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Permissions for /var/hda/files

Postby bigfoot65 » Fri Sep 28, 2012 7:48 am

That is my point. Wondering if its an isolated incident. Guess we will have to see if anyone else complains.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

jiml
Posts: 28
Joined: Wed Jan 13, 2010 1:13 am

Re: Permissions for /var/hda/files

Postby jiml » Fri Sep 28, 2012 11:22 am

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

Ubuntu 12.04 (64bit)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Permissions for /var/hda/files

Postby bigfoot65 » Fri Sep 28, 2012 7:33 pm

Nice script. Would you mind adding it to the wiki? Also why 666 got files? We typically do 775 on directory and files.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

jiml
Posts: 28
Joined: Wed Jan 13, 2010 1:13 am

Re: Permissions for /var/hda/files

Postby jiml » Sat Sep 29, 2012 3:22 am

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.

Ubuntu 12.04 (64bit)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Permissions for /var/hda/files

Postby bigfoot65 » Sat Sep 29, 2012 5:29 am

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 28 guests