PDA

View Full Version : How do I set Permissions?


lilwoolie
3rd November 2009, 08:26 PM
How do I set Permissions on my drives? While in Fedora 11 I can see/open my Mac drives but I have NO permission to do anything with files on them. I can copy FROM them but not TO them. Any ideas?

weitjong
4th November 2009, 08:35 AM
Not sure we are describing the same thing. I have a mac mini recently and have turned on the sshd service on the mac. In F10 I am using "Places > Connect To Server..." and choosing the ssh as the service type to login to the mac mini using credential from my mac account. This is how I see my mac drives. Is this your approach as well?

Using my approach, I can do read/write operation on my own user directory as my account could do should I login to terminal/console in mac directly. Of course I cannot create any files in any directories which I don't have the write permission. Mac is partly based on BSD, so normal UNIX file permission security applies.

weitjong
5th November 2009, 06:02 AM

I have been using Linux for a long time now (in IT speak) and I know exactly what you are saying. But from the past few days as newbie in Mac world, I could probably say the same with Mac OSX. Yes, it is well polished but I am still back to the same old troubleshooting, driver hunting, user-forum searching mode when something is not working well.

Yesterday, I just realized my HP Photosmart C6180 All-in-One needs new a driver from HP in order to get my scanner to work on the mac mini. Only to find out later that the bonjour connection (my Photosmart is connected wirelessly) is not stable. The Mac forum says it will only work with USB connection (of course I don't believe them because I can get the scanner working over my F10 wirelessly). At least now I figure out that the bonjour connection will be visible for the first few minutes after my linksys router is rebooted - enough time for my scanner to scan the image.

The days before I was having problem with iTunes which cannot download the Album cover artworks. Why? Because there is no iTunes store for Singapore yet. But Why do I need the store to get the stupid cover artworks? Rhythmbox gets the artworks for me anytime I have a network connection. And one thing leads to another - now you know why I need my scanner to work :)

scottro
5th November 2009, 08:25 AM
Well, the important thing was what you said--you didn't say Mac OS X is the best OS, you said, "BEST OS for me," which is fine.

While we could all go back and forth about things we can do with Linux (or Windows!) that we can't do with Mac, and while I'm sure many of us are sorry to hear it doesn't work for you, if you're happy with OS X, then use it.

Like weitjong, I do understand what you're saying. It often does seem to be one darn thing after another. On the other hand, like weitjong, I've also had fewer issues in gettng an all in one to work under Linux than I did under Mac.

If you change your mind, we'll be here. :D

lilwoolie
5th November 2009, 06:24 PM
I'm going to try a LITTLE longer with Fedora 11.

I STILL can't get permission to my drives. It either says permissions can't be determined or that I'm not the owner so I can't change permissions. QUESTION: If, I'm not the owner... WHO is?

When booted on my Mac drive I have file sharing on, ssh on, ftp on, web sharing and everything on that I can think of on, but when I boot into fedora I can open internal, external (firewire and such) but I STILL can't get permission do anything, like move, add/delete files/folders... because I'm not the owner.

Any ideas?

maflynn
6th November 2009, 01:12 AM
I usually need to start up a nautilus session under root to access my OSX drives. I wouldn't try adjusting the OSX drive permissions under F11 as that could have unseen consequences under OSX. Basically your user account under F11 is different then what is shown as the owner under OSX so it won't let you look at anything unless you sign on with root.

At one point under ubuntu I was able to authenticate the drive w/o needing to use root but I forget exactly how I did that.

Dies
6th November 2009, 03:44 AM
QUESTION: If, I'm not the owner... WHO is?

Find out. ;)

For example

su
cd <path to mac files>
ls -nla

look at the output, something like

drwxr-xr-x 58 1000 1000 4096 2009-11-05 22:36 .
drwxr-xr-x 3 0 0 4096 2009-10-05 06:18 ..
drwx------ 3 1000 1000 4096 2009-10-05 11:59 .adobe
-rw------- 1 1000 1000 6805 2009-11-04 03:39 .bash_history
-rw-r--r-- 1 1000 1000 220 2009-10-05 06:18 .bash_logout
-rw-r--r-- 1 1000 1000 3180 2009-10-05 06:18 .bashrc

So these files belong to user 1000/group 1000. Fedora uses 500 for the starting uid/gid, but if you look at the files on your Mac you'll see they are probably 501/20.

I have no idea if that's your problem or not, but an easy way to check would be to make a new account, the new account *should* be 501/501. ;)

Now login and see if you can access the files from your Mac, if you can, then there you go, just migrate to the new account. If not, then it's back to the drawing board. :D

weitjong
6th November 2009, 05:03 PM
I'm going to try a LITTLE longer with Fedora 11.

I STILL can't get permission to my drives. It either says permissions can't be determined or that I'm not the owner so I can't change permissions. QUESTION: If, I'm not the owner... WHO is?

When booted on my Mac drive I have file sharing on, ssh on, ftp on, web sharing and everything on that I can think of on, but when I boot into fedora I can open internal, external (firewire and such) but I STILL can't get permission do anything, like move, add/delete files/folders... because I'm not the owner.

Any ideas?

Glad to hear that :)

Can you tell us how do you get Fedora to "see" the Mac drive? I already explained in my previous post that my approach is by turning on the sshd service in Mac (in the Sharing - tick the "Remote Login"). As we are trying to initiate the connection from Fedora to Mac. It is the firewall on the Mac's side that we need to worry about. It should be configured so that it accepts incoming ssh traffic. On my less than one month old mac mini, I have not turned my Firewall on yet. Judging from your post, I don't think you have any firewall issue either.

I am using ssh to login to Mac OS X to access the Mac drive, instead of accessing the Mac drive from Fedora directly. Here is an example of my ssh session (in red color). Note that it does not really matter that my uid in Fedora and in Mac are different because I am logging in as me "weitjong" which is recognized on both sides.

[weitjong@icecastle ~]$ pwd
/home/weitjong
[weitjong@icecastle ~]$ id
uid=500(weitjong) gid=500(weitjong) groups=500(weitjong) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[weitjong@icecastle ~]$ ssh snowleopard
Password:
Last login: Sat Nov 7 00:14:35 2009
SnowLeopard:~ weitjong$ pwd
/Users/weitjong
SnowLeopard:~ weitjong$ id
uid=501(weitjong) gid=20(staff) groups=20(staff),204(_developer),100(_lpoperator), 98(_lpadmin),81(_appserveradm),80(admin),79(_appse rverusr),61(localaccounts),12(everyone),103(com.ap ple.access_ssh),102(com.apple.sharepoint.group.2), 101(com.apple.sharepoint.group.1),401(com.apple.ac cess_screensharing)
SnowLeopard:~ weitjong$ touch myfile
SnowLeopard:~ weitjong$ ls myfile
myfile
SnowLeopard:~ weitjong$ exit
logout
Connection to snowleopard closed.
[weitjong@icecastle ~]$

Using the Nautilus Places "Connect to Server", I can see the content of the drive in nice GUI.
1838018381

Hope this help.

lilwoolie
6th November 2009, 05:55 PM
I'm new at linux, I don't understand all the command stuff you put up in the box in your reply weitjong.

And how do you sign on with root?
I'm don't know what nautilus is.

Using "Places > Connect To Server" I tried using sssh... didn't work. I tried ftp... it didn't work. So I tried Custom and just typed in my ip addy and my Mac showed on my desktop. I can pretty much do what I want from there.

For some reason though I can't do the same from my Mac. I can't login to fedora at all. I have 2 other G4s on my network (they aren't on at the moment) and I have no problem accessing them from my Mac. As far as I know I have everything checked on my Mac in sharing pane but still nothing. afp://, ftp:// ssh, still no connection to fedora.

In Security pane/firewall I have:
file sharing (afp, ftp, SMB)
printer sharing
web sharing
remote login (SSH)

I'm just a novice computer dude but I'm not computer dumb. I've had Macs since 1991 and I won't go back to a PC. I'm pretty much a trouble shooter when it comes to seeing how and making things work. I don't give up too easily. Linux almost had me!

weitjong
7th November 2009, 09:59 AM
In my previous post I was using the ssh command with one option, "snowleopard". This is the hostname that I already predefined in my Fedora which resolves to the fixed IP address my router assigned to my Mac mini. You can define the hostname anything you want or use the IP address to connect like you have done. One more thing, you can also specify explicitly the Mac user name you want to use to login to Mac in the command line or in the "Connect To Server" parameter should it be different than what you have in Linux. Something like:

$ ssh -l mymacusername 192.168.1.101 (substitute the IP with yours)

If the above works for you?

I haven't tried the "Custom Location" type in "Places > Connect To Server" so I cannot comment on this approach. But I think it only works because you have turned on other sharing options in your Mac.

If you are using Places and file browser in Fedora default desktop, you are using Nautilus already. So, don't worry about the nautilus thingy.

In your last post, if I understand you correctly now you were trying to establish the connection but the other way round. This should work as well. The principle is the same. Just that this time you have to turn on the sshd service and configure the firewall on the Fedora to accepts incoming ssh traffic.

1. Turn on the sshd service. Goto "System > Administration > Services", enable the service permanently or just ensure it is running in the current session by pressing the Start button.
18386
Usually I use command line to do this.

2. Configure firewall. Goto "System > Administration > Firewall", either temporarily disable the firewall for testing or keep it enabled but knock a hole by allowing ssh traffic to go through by ticking the checkbox.
18385

Note that this will only enable you ssh from a terminal on Mac to Fedora machine. I have confirmed that in my setup.

Unfortunately though, this setup won't work with Mac's Finder "Connect To Server". Why? Because it does not support ssh or sftp :). Seriously, I would expect Apple to do better than that. I think not all is lost. I am newbie myself in Mac. A quick google shows that there are third party apps that try to fix this deficiency. Or you can try to setup an NFS export in Fedora which Finder does support - I have never tried to setup NFS myself, so I cannot comment much.

Good luck.