Solved

How to set permission to the folder

Posted on 2007-04-02
15
2,726 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

707 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

17 Experts available now in Live!

Get 1:1 Help Now