LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   a question on permissions... (https://www.linuxquestions.org/questions/linux-newbie-8/a-question-on-permissions-760787/)

trist007 10-09-2009 10:29 AM

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?

TB0ne 10-09-2009 10:40 AM

Quote:

Originally Posted by trist007 (Post 3713557)
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.....

trist007 10-09-2009 10:53 AM

lol, yeah I guess they do. I tried to phrase them as clearly as possible.

SaintDanBert 10-09-2009 11:59 AM

Quote:

Originally Posted by TB0ne (Post 3713570)
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

smeezekitty 10-09-2009 12:13 PM

Quote:

Originally Posted by trist007 (Post 3713557)
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

SaintDanBert 10-09-2009 12:15 PM

Quote:

Originally Posted by trist007 (Post 3713557)
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 (Post 3713557)
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 (Post 3713557)
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 (Post 3713557)
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

i92guboj 10-09-2009 12:23 PM

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 (Post 3713641)
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.

SaintDanBert 10-09-2009 01:10 PM

Quote:

Originally Posted by i92guboj (Post 3713669)
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

i92guboj 10-09-2009 01:21 PM

Quote:

Originally Posted by SaintDanBert (Post 3713728)
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.

smeezekitty 10-09-2009 01:25 PM

Quote:

if s/he is willing
wtf?
Quote:

so s/he can continue
wtf?

jschiwal 10-09-2009 01:27 PM

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.


All times are GMT -5. The time now is 02:29 PM.