LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-09-2009, 10:29 AM   #1
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
a question on permissions...


1. What happens if you have a file with a 755 permissions and transfer the file from one linux computer to another linux computer, both having ext3 filesystems. Do the permissions change to the default permissions of the directory that the file was downloaded to?

2. What would happen to the permissions if you transfer a file from linux to windows ntfs hard disk?

3. What would happen to the permissions if you transferred a file from fat32 filesystem on linux to a windows fat32 hard disk?

4. What would happen to the permissions if you tranferred a file from windows xp ntfs to ext3? What would happen if you transferred the file right back from the ext3 to the original ntfs filesystem on windows xp?
 
Old 10-09-2009, 10:40 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,807

Rep: Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179
Quote:
Originally Posted by trist007 View Post
1. What happens if you have a file with a 755 permissions and transfer the file from one linux computer to another linux computer, both having ext3 filesystems. Do the permissions change to the default permissions of the directory that the file was downloaded to?

2. What would happen to the permissions if you transfer a file from linux to windows ntfs hard disk?

3. What would happen to the permissions if you transferred a file from fat32 filesystem on linux to a windows fat32 hard disk?

4. What would happen to the permissions if you tranferred a file from windows xp ntfs to ext3? What would happen if you transferred the file right back from the ext3 to the original ntfs filesystem on windows xp?
These sound very much like homework questions.....
 
Old 10-09-2009, 10:53 AM   #3
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Original Poster
Rep: Reputation: 69
lol, yeah I guess they do. I tried to phrase them as clearly as possible.

Last edited by trist007; 10-09-2009 at 10:55 AM.
 
Old 10-09-2009, 11:59 AM   #4
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.3 with Cinnamon & KDE
Posts: 1,530
Blog Entries: 3

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by TB0ne View Post
These sound very much like homework questions.....
This sounds very much like "Take your problems down the hall."
If you write to suggest that someone has a school assignment
and is posting questions to crib the answers, you presume
the bad intentions of someone new to LQ. Not very friendly.
Even if you are correct, how is this any different from asking
someone down the hall or in a coffee house these same questions?

Sorry,
~~~ 0;-Dan
 
Old 10-09-2009, 12:13 PM   #5
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,330

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
Originally Posted by trist007 View Post
1. What happens if you have a file with a 755 permissions and transfer the file from one linux computer to another linux computer, both having ext3 filesystems. Do the permissions change to the default permissions of the directory that the file was downloaded to?
preserved
Quote:
2. What would happen to the permissions if you transfer a file from linux to windows ntfs hard disk?
read and write permission preserved execute permission lost
Quote:
3. What would happen to the permissions if you transferred a file from fat32 filesystem on linux to a windows fat32 hard disk?
preserved
Quote:
4. What would happen to the permissions if you tranferred a file from windows xp ntfs to ext3? What would happen if you transferred the file right back from the ext3 to the original ntfs filesystem on windows xp?
preserved
you know people should not do you homework for you
 
Old 10-09-2009, 12:15 PM   #6
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.3 with Cinnamon & KDE
Posts: 1,530
Blog Entries: 3

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by trist007 View Post
1. What happens if you have a file with a 755 permissions and transfer the file from one linux computer to another linux computer, both having ext3 filesystems. Do the permissions change to the default permissions of the directory that the file was downloaded to?
Processes read create files. One process on the local workstation (W/s) reads, with permission, and sends to the network. Another process on the remote w/s gathers from the network and writes files. That remote process has a UID+GID and umask. The target folder has all of its bits.
The remote process attributes and context control what happens during the file write attempt.

Quote:
Originally Posted by trist007 View Post
2. What would happen to the permissions if you transfer a file from linux to windows ntfs hard disk?
Again the process rule applies. Does the local w/s have read-write access to a local NTFS? If so then the local process attributes are used to ask NTFS to store the file. Did you simply copy or did you use copy with options to preserve original file settings? Is the process running as the root user? Does the process uid+gid match the uid+gid of the original file owner? All of these play a role.

Quote:
Originally Posted by trist007 View Post
3. What would happen to the permissions if you transferred a file from fat32 filesystem on linux to a windows fat32 hard disk?
Fat32 has one permission and several attributes, READ_ONLY. It is either on or off. In a Linux world, that permission appears as
"-r--r--r--" meaning everyone can read . You must be able to read the file before you can copy from fat32. It does not matter which OS runs, fat32 is just that. [NOTE--Recent court rulings cover the use of fat32 on systems that are not native Microsoft or suitably licensed.]

Quote:
Originally Posted by trist007 View Post
4. What would happen to the permissions if you tranferred a file from windows xp ntfs to ext3? What would happen if you transferred the file right back from the ext3 to the original ntfs filesystem on windows xp?
Again, the process(es) doing the transfer govern what is happening.
Windows has its own rules when copying files. In windows networking,
file attributes change hands. Linux accomplishes windows networking using a package called SAMBA. The SAMBA docs do a very good job of explaining how permission decisions are made.

Cheers,
~~~ 0;-Dan
 
Old 10-09-2009, 12:23 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,072

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
The response to all is "it depends on the software you use, and the options you use" (that's why tar has -p and cp has -p and -a, duh?). It's one of these questions that have no real meaning because that's not the response that your teacher wants (although it is the correct one) and is only designed so you answer what the teacher told you in the classroom, even if it's inaccurate or just plain wrong.

That's true except for the 'x' permission in 2), and in 4) assuming that you want to give details of the process in that one.

Quote:
Originally Posted by SaintDanBert View Post
This sounds very much like "Take your problems down the hall."
If you write to suggest that someone has a school assignment
and is posting questions to crib the answers, you presume
the bad intentions of someone new to LQ. Not very friendly.
Even if you are correct, how is this any different from asking
someone down the hall or in a coffee house these same questions?

Sorry,
~~~ 0;-Dan
It's just the forum policy, not to solve anyone else's homework. It's a good moment to re-read the rules, and also to remember that your teacher might perfectly be an LQ member as well. Besides that, even if s/he's dumb like a cow, a simple google for the verbatim strings will reveal any hit here or in any other public place of the net.
 
Old 10-09-2009, 01:10 PM   #8
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: Austin, TX
Distribution: Mint-17.3 with Cinnamon & KDE
Posts: 1,530
Blog Entries: 3

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by i92guboj View Post
It's just the forum policy, not to solve anyone else's homework.
I'm running an antique edition of "crystal ball." I remember being a youngster working on my own to learn about computers. How are we supposed to guess the intentions of someone who asks a question? Who knows the writer might be some young person, working their way through some book of exercises all on their own. No "homework" just honest inquiry.

If policy is, "don't answer homework" and you suspect the question is homework, simply avoid posting an answer. Without an answer, the writer
will go away.

Cheers,
~~~ 0;-Dan
 
Old 10-09-2009, 01:21 PM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,072

Rep: Reputation: 384Reputation: 384Reputation: 384Reputation: 384
Quote:
Originally Posted by SaintDanBert View Post
I'm running an antique edition of "crystal ball." I remember being a youngster working on my own to learn about computers. How are we supposed to guess the intentions of someone who asks a question?
I didn't write the rules. If you have complains about that you should post to the forum feedback section with your questions or suggestions.

Quote:
Who knows the writer might be some young person, working their way through some book of exercises all on their own. No "homework" just honest inquiry.
A person that is doing the research him/herself usually has a different insight of things, and don't usually paste "verbatim" exercises, but rather try to clear the conflicting points so s/he can continue the research.



Quote:
If policy is, "don't answer homework" and you suspect the question is homework, simply avoid posting an answer. Without an answer, the writer
will go away.
I prefer telling him or her that we don't answer that kind of questions, and that if s/he is willing to do some research and ask concrete questions or ask for directions rather than pasting verbatim whatever the teacher gave him/her we will be here to help. It's the way of action that I consider to be better.

Besides that, sometimes it's not clear if it's homework or not, and in that case explaining the situation to the OP can push him or her to give more details and show the research s/he's done up to the current moment, so we can see ourselves that's not homework, or that it's homework but that s/he's done the research and just needs a bit of guidance on very concrete matters.
 
Old 10-09-2009, 01:25 PM   #10
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,330

Rep: Reputation: 227Reputation: 227Reputation: 227
Quote:
if s/he is willing
wtf?
Quote:
so s/he can continue
wtf?
 
Old 10-09-2009, 01:27 PM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
A lot of the questions can be answered by experimentation.

Create an account on your machine for another user. Save a file in /tmp and have the second user copy it back. Look at the cp options.

If you have a pen drive that uses vfat32, you can copy files to it, and experiment mounting it with different "uid","gid","fmask" and "dmask" values. You can create an ntfs filesystem on a file and mount it using the 'loop' option.

Also enter "help umask" in the terminal so you understand the effect it has.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissions Question sunmicroman Linux - General 1 11-30-2005 12:22 PM
permissions question sunman Slackware 7 11-18-2005 10:00 PM
Question about permissions UnforgotteN Linux - Distributions 6 05-18-2005 08:51 PM
Another permissions question BajaNick Linux - Software 2 01-21-2004 11:40 AM
permissions question cinnix Linux - General 2 07-09-2001 07:59 AM


All times are GMT -5. The time now is 08:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration