Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

CPYTOIMPF and Permission

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CPYTOIMPF and Permission

    Hello Shafiq and All who are interested, I have the same question, how can one inherit the permissions (authorities) from the parent folder when copying to the IFS (root file system)? When you create a new .txt file in the IFS using a Windows PC and a NetServer share, the new file inherits all of the permissions from the parent. When you create a new file using the OS/400 CPYTOIMPF or CPYTOSTMF in V5R2, you do not inherit the private authorities from the parent folder. I believe you just get the owner assigned to the user profile of the iSeries job and probably the same primary group (not sure on the group). I for one, as a software developer find this a big oversight in the CPYTOIMPF and CPYTOSTMF file command capabilities. Alternatively, a command that would create a blank file that inherits from the parent directory would suffice. Using the CPYTOPCD command, which only goes to QDLS (the Windows 3.1 or DOS type directory structure), there is an option on the command to inherit from the authorities of the parent folder. I have researched and found that the CPY command will copy over the IFS authorities (in addition to the data) from one file to another even if the new file already exists (*REPLACE is required if the file already exists). It is not restricted to QDLS. I do not see a way to do a CPY command from a directory object to a file object. In limited exposure to V5R3, I don't see anything indicating that the inherit from parent directory capability is provided (in V5R3). Thus, in our software package, we have had to resort to a funky set of instructions for an administrator to follow if the new stream and import files are to be available for several user profiles that are not within the same group (or within the same group but not available to all users). This involves setting up a blank file that acts as an authorities or permissions template and steps to follow on both the PC and the iSeries command entry line. After the permissions template is set up by the administrator, the permissions are copied appropriately by our software without any further intervention by the user, although drawbacks include a hard-coded template file name and that the set of default authorities is static from the user's perspective. I have a few more avenues to research over the next few weeks, I will advise if I find out anything further.

  • #2
    CPYTOIMPF and Permission

    Hi, When using CPYTOIMPF, what will be the permission of the TOSTMF in the folder? Is it possible to set the permission using copying? Will the permission will be inherited from the permission of the folder itself? Thanks Shafiq

    Comment

    Working...
    X