Solved

How to set permission to the folder

Posted on 2007-04-02
15
2,732 Views
Last Modified: 2013-12-16
How to set permission on a folder, so that the server can access it, the folder is located on a remote pc and the server particularly coldfusion server that is running on linux will access to it, it will get the file to be attach on the cfemail tag.
0
Comment
Question by:basty23
  • 5
  • 4
  • 3
  • +3
15 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 18840753
Is the remote PC running Windows?  Is the folder mounted on the Linux server?
0
 

Author Comment

by:basty23
ID: 18840780
yes the remote pc is running on windows... and the server is running in linux
0
 
LVL 48

Expert Comment

by:Tintin
ID: 18840971
And do you have the Windows folder mounted on the Linux server?
0
 

Author Comment

by:basty23
ID: 18840999
no the folder is mounted on windows....
0
 
LVL 48

Expert Comment

by:Tintin
ID: 18841048
So how are you currently accessing the folder from the Linux server?  
0
 

Author Comment

by:basty23
ID: 18841361
that is the problem because i cant access the file, i tried mapping it but no good, do u have any idea on how to access the file?
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 18843040
I can supply a bit more info for the linux folks based on the previous question (basty23...you really need to learn to put more detail in your questions...it was 5 comments deep before I knew you were dealing with a linux cf server and didn't find out until this q that you were operating linux and windows)

basty25 is trying to access a network file location on a windows box using cf server on linux

How we'd do this in a pure windows environment is to create a domain user named cfservice and then run the cf server service under that account then assign cfservice permissions to the network folder..viola...works like a charm

I recommended a post in the linux area on assigning linux directory permissions as it appeared from responses that this was a pure linux environ. however as I find out in this q, it's not these permissions that are the problem. Basty23 has instructions in the previous q on setting up windows folder perms.

The question is more how to run a linux service as a specific user and whether that user can interact in a mixed environ...


0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 14

Accepted Solution

by:
ygoutham earned 125 total points
ID: 18844111
remote server is on windows and has a share name CFSHARE

from windows we normally access the same as \\SERVER\CFSHARE and then get prompted to provide the username and password for doing the same.  I am presuming myself as the user and giving my login details.  

From linux, get to the command prompt where you can punch in commands like "ls" "netstat", etc and then issue the following command

root@localhost# mount -t smbfs -o username=ygoutham,password=ygoutham_password,uid=ygoutham,gid=ygoutham //SERVER/CFSHARE /mnt/some/directory/name

the uid and gid is the same as the login name
0
 

Author Comment

by:basty23
ID: 18848116
thank you so much SidFishes for the help,,, but i have a question to  ygoutham about his suggestion, do  you mean  i will access the shared folder manually?  
0
 

Author Comment

by:basty23
ID: 18848289
do i have to do that every time i access the file? what about this scenario:

in my code i will access the remote pc to get the file and attach to mail
0
 
LVL 48

Expert Comment

by:Tintin
ID: 18848483
You have two choices.

1.  You can leave the shared folder permanently mounted on the Linux server.
2.  Get your script on the linux server  to manually mount/unmount the shared folder.

Depends on the nature of what access you really need.
0
 
LVL 14

Expert Comment

by:ygoutham
ID: 18848611
windows (or samba) shares mounted on a linux system remains mounted till they are unmounted or the system goes down for a reboot.  so no need to mount everytime.  once mounted, it stays mounted.  the files are available as a local file for the system which can be accessed through

cp /mnt/some/share/directory/some_file_name.ext  /to/some/path/of/your/choice/
0
 
LVL 14

Expert Comment

by:ygoutham
ID: 18848616
if the remote type does not accept  a "-t smbfs" which means that it is a windows share or a samba share then try "-t cifs".
0
 
LVL 16

Expert Comment

by:Hanno Schröder
ID: 21170263
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
ACCEPT ygoutham's comment {http:#18844111} as answer

Any objections should be posted here in the next 4 days. After that time, the question will be closed.
JustUNIX, Experts Exchange Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21198274
Forced accept.

Computer101
EE Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now