I have an external drive on which I backed up data from another external drive using my Ubuntu 12.10 system. Now it would seem that there is a problem with folder and file permissions on the drive as I cannot access the files from another system (namely, my iPad through a Verbatim MediaShare Wireless device and the app for it).
Some folders do not show their contents at all (but the files are there thankfully, as they show up when I plug the drive to my Ubuntu system), other files cannot be opened.
This only happened after backed up the date on the external drive. The same data on the other external drive on which it was backed up was accessible with no problem at all. My logical conclusion, and I have to stress that my knowledge is limited here, is that the problem is with the ownership and permission settings.
I would like to make my external drive and the data on it, accessible to all (those that plug it in) so that I can access it on my iPad. Actually, I am also open to the idea of having the drive accessible to all with some folders accessible to all with read / write permissions and with others with only read permissions or with no accessibility at all. That is what would like to do and I am also open to your suggestions on security issues (i.e. making the setup more secure, as long as I can have access and read/write permissions on the drive while connected to my iPad). I am assuming that to do what I want I require accessibility available to all as well as read permissions, in the least.
First, using chmod -R 777, which I see mentioned on every similar question, would make every document inside the main folder executable, and I doubt you need (or want) that. What you need is to change permissions for everyone else to have read-write access to the storage drive. That can also be achieved through chmod.
For example, the following file has read-write permission for the owner only and read-only access for the group, meaning I can't read or edit:
There are four digits for chmod which can be combined to achieve a different result:
4 - read
2 - write
1 - execute
0 - nothing
And there are three digits that change file permissions for different things:
first digit - owner
second digit - group
third digit - everyone else
To make a file in question readable by anyone, while still retaining the original permission for the owner and group, I can execute this:
That makes file read-write for owner (2+4), read-only for group (4) and read-write for anyone else (2+4). Now I can view and edit it, and ls -l now says the following:
In case of applying that to the entire storage drive, you'd have to mount it, like so:
Replace /dev/sdX with your external storage drive and /path/to/mountpoint with where you want the drive to be mounted (I usually make a directory in /mnt for that). You can also check which storage drive is the external one with:
So you don't chmod the wrong one. And then run
which will recursively change permissions for each and every file and folder on the mounted storage drive, allowing read/write access to the owner, read-only access to the group and read/write access to everyone else.
Put simply, chmod -R 646 will make all folders and files on the storage drive accessible, readable and editable by anyone on any PC and/or OS, while keeping default permissions for the file owner and group.
The easy way is to:
sudo nautilus